Exit Menu CallBack
#1

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.
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerExitedMenu

pawn Код:
TogglePlayerControllable(playerid, 1);
You can use this at OnPlayerExitedMenu callback.
Reply
#3

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...
Reply
#4

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
Reply
#5

As you can see OnPlayerExitedMenu doesn't return the value something like 'exitedmenu' so that i can do a
Код:
if (exitedmenu == mymenu) {
do smth
}
Reply
#6

That's why i gave you this link:
https://sampwiki.blast.hk/wiki/GetPlayerMenu
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)