Skip to content

Menu fixes, rewrite garage opening code, minor tweaks #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 6, 2025

Conversation

NexiusTailer
Copy link
Collaborator

@NexiusTailer NexiusTailer commented May 6, 2025

  1. SA-MP styled menus were bugged: they didn't have critical validations; used the wrong (textdraw title) ID to add it to menu pool instead of menu ID, thus breaking any other menu related functions which later try to work with this menu; and it also used a textdraw for its title for some unknown reason, so that the title was always set with some offset related to menu box and it wasn't really attached to it.

Now it has all needed validity checks, also correctly working with nested menus (selecting an item won't produce exit event, but only selection event like SA-MP does, while exit event is only called when you really exit the menu via 'X' button or Enter key) and ofc now has its title rendered with the same means as the menu box itself, so it's a whole thing.

Here is how menus look now after all the corrections.

  1. Garage opening code now uses appropriate events and checks using colsphere. This fixes #11

  2. Some minor fixes for the recent changes

@@ -432,7 +432,7 @@ end
function RemovePlayerAttachedObject(amx, player, index)
local playerID = getElemID(player)
local obj = g_Players[playerID].attachedObjects[index] -- Get the object stored at this slot
if obj ~= nil and obj ~= false then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh good catch, lol 😅

Copy link
Collaborator

@colistro123 colistro123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merging, thank you! 😊

@colistro123 colistro123 merged commit c548ea1 into multitheftauto:develop May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inefficient garage opening code
2 participants