Skip to content

SimpleMenu 2.0

Latest

Choose a tag to compare

@Thymester Thymester released this 06 Nov 00:56
· 1 commit to master since this release
9ad3db0

Release Notes for SimpleMenu v1.1

Overview

This update refactors the SimpleMenu script for better organization, modularity, and maintainability. Code has been separated into logical directories, syntax errors have been fixed, and new features have been added. All changes ensure compatibility with FiveM while improving performance and usability.

New Features

  • Never Wanted Toggle: Added a new menu option in the Player Menu to toggle "Never Wanted" mode.

Structural Changes

  • Directory Organization:
    • Moved configuration lists (cars, weapons, peds, etc.) to config/config.lua.
    • Split menu logic into separate files under menus/ (admin.lua, emergency.lua, cars.lua, player.lua, civilian.lua, close.lua).
    • Created utils/utils.lua for shared utility functions (notify, giveWeapon, spawnCar, loadAnimDict, etc.).
  • Modular Loading: Updated __resource.lua to load files in the correct order via client_scripts, ensuring dependencies are resolved before execution.
  • Code Separation: Removed hardcoded lists and utility functions from the main SimpleMenu.lua, promoting separation of concerns.

Bug Fixes

  • Syntax Errors: Fixed multiple parsing errors in menu files, including incorrect else if statements (changed to elseif), missing end keywords, and unbalanced function closures.
  • Function Availability: Resolved "attempt to call a nil value" errors for functions like Admin, PlayerMenu, AddMenu_Civilian, and loadAnimDict by ensuring proper file loading and function definitions.
  • Load Order Issues: Adjusted the order of scripts in __resource.lua to prevent premature function calls.

Improvements

  • Maintainability: Easier to add/remove menu items or modify configurations without touching core logic.
  • Performance: Reduced script load times by organizing code into modules.
  • User Experience: Enhanced menu navigation with new toggles and animations, plus better error handling.

Known Issues

  • Ensure all dependencies (e.g., NativeUI) are properly installed in your FiveM server.
  • Test in a development environment before deploying to production.

Installation/Upgrade Notes

  • Replace existing SimpleMenu.lua and related files with the updated versions.
  • Restart your FiveM server/resource after applying changes.
  • No database migrations required.

For full code changes, refer to the updated files in the repository. If issues persist, check server console logs for additional errors.