[FREE] Lobby style menu framework

Looks good, but it will not work for folks that use the mouse to select buttons.

Damn, I hate these people xD

1 Like

Is there a way to keep the index of the current selected button, when I update the menu? Or is there another way to change the description section without updating the menu?

Never mind, I fixed it by adding an extra event just to update the details scaleform

1 Like

So, for this type of things, I can make a loop in the same script and constantly “get” the info for the selected button, like this:

local _menuID = exports['critLobby']:LobbyMenuGetActiveMenu()
local buttonID, buttonText, buttonParams = exports['critLobby']:LobbyMenuGetSelectedButtonParam() -- first param is the buttonID, same as GetPauseMenuSelection(), second param is the text displayed on the button, third param is the buttonParam that you provided when creating the button, can be anything.

If you constantly check this in a loop, as long as your menu is active, you can, for example, modify the tooltip to show different things for each button.

1 Like

IMPORTANT!!! This method requires at least a Citizen.Wait(250), else the current value is the last button and not the real current one!

1 Like

@CritteR If you’re interrested, look what I created with your awesome script!

(Srry for the weird background music and the task bar, my friend recorded the video :sob:)

1 Like

Hi, have any of you managed to synchronize this menu with all players? My problem is that being all client-side, when a player enters the lobby, he doesn’t see the other players who entered the lobby previously.

Just send an event to every player and reload the menu if it’s opened :thinking:

@Kattrigerkatta how could I do? would you help me?

@Luis_DJ Create a net event that has the entire menu logic (creating the menu, adding buttons, etc), and trigger that event from the server, with all the needed data.

Check this release, for inspiration: GitHub - CritteRo/CritteR-s-Blood-Bowl: GTA San Andreas Blood Bowl minigame working in FiveM.

1 Like