Exit Menu CallBack - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Exit Menu CallBack (
/showthread.php?tid=85862)
Exit Menu CallBack -
Paranoja - 10.07.2009
I need something like a callback when you exit menu.
I have maded myself a carshop, and since i pickup the thing which stands for opening the menu, also it automaticaly freezes my character (TogglePlayerControllable(playerid,0)
.
If i select any of rows of the menu, everything is fine character gets unfreezed, but if i press enter, the menu disapears and my character is left freezed.. So is there any callback when a person exits the menu (with ENTER button) to do unfreeze? Thanks for your answers.
Re: Exit Menu CallBack -
Correlli - 10.07.2009
https://sampwiki.blast.hk/wiki/OnPlayerExitedMenu
pawn Код:
TogglePlayerControllable(playerid, 1);
You can use this at OnPlayerExitedMenu callback.
Re: Exit Menu CallBack -
Paranoja - 10.07.2009
But i only need to do this function on certain Menu ID, because i also want to add more things to do on menu exit.
I have done it before, but i don't remember how, and the link where it was maded is down...
Re: Exit Menu CallBack -
Correlli - 10.07.2009
Quote:
Originally Posted by Paranoja
But i only need to do this function on certain Menu ID
|
https://sampwiki.blast.hk/wiki/GetPlayerMenu
https://sampwiki.blast.hk/wiki/OnPlayerExitedMenu
Re: Exit Menu CallBack -
Paranoja - 10.07.2009
As you can see OnPlayerExitedMenu doesn't return the value something like 'exitedmenu' so that i can do a
Код:
if (exitedmenu == mymenu) {
do smth
}
Re: Exit Menu CallBack -
Correlli - 10.07.2009
That's why i gave you this link:
https://sampwiki.blast.hk/wiki/GetPlayerMenu
Re: Exit Menu CallBack -
Paranoja - 10.07.2009
First i thought that GetPlayerMenu(); not going to work since the menu is exited, so GetPlayerMenu shouldn't work, but i was wrong.
Thank you, worked.