SA-MP Forums Archive
GetPlayerMenu problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetPlayerMenu problem (/showthread.php?tid=320641)



GetPlayerMenu problem - Audiophr3ak - 24.02.2012

Hello there, im having the following trouble: GetPlayerMenu gets only the first one menu i used in game, and if im trying to use and exit other menu, GetPlayerMenu still says that i exited the first menu (Which i used before). Any ideas about what to do?

public OnPlayerExitedMenu(playerid)
{
new Menu:current = GetPlayerMenu(playerid);
if(current == vehd || col1 || col2)
{
DestroyVehicleEx(VehShow[playerid]);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerSpectating(playerid, 0);
}
else if(current == clos || gang)
{
SetPlayerSkin(playerid, GetPVarInt(playerid, "s"));
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
}
return 1;
}


Re: GetPlayerMenu problem - clavador - 24.02.2012

Post the full code if possible.


Re: GetPlayerMenu problem - Audiophr3ak - 24.02.2012

When im exiting menu by pressing F(Enter Car) button, the server still thinks that im using this menu, even when i allready used other menus after this. Maybe i should use HideMenuForPlayer with all manipulations with menu row selections and stuff?

SOLVED: im showing-hiding another empty menu for a player after he exited some menu, and server resets player internal menu variable.