SA-MP Forums Archive
ShowModelSelectionMenuEx not responding - 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: ShowModelSelectionMenuEx not responding (/showthread.php?tid=593430)



Nevermind - Mikkel_RE - 05.11.2015

Nevermind, i found out by myself


Re: ShowModelSelectionMenuEx not responding - Mikkel_RE - 05.11.2015

This is how the menu looks when i type /buyplane




Re: ShowModelSelectionMenuEx not responding - AnthonyDaSexy - 05.11.2015

mSelection doesn't work like a regular dialog, modelid != listiem. modelid is the id of the model in the preview textdraw not the listitem.
Instead of doing this:
pawn Код:
if(modelid == 0 && PlayerInfo[playerid][pAccount] > 8999999) // Maveric
if(modelid == 1 && PlayerInfo[playerid][pAccount] > 6999999) // Sparrow
if(modelid == 2 && PlayerInfo[playerid][pAccount] > 9999999) // Shamal
Do this instead and it should work:
pawn Код:
if(modelid == 487 && PlayerInfo[playerid][pAccount] > 8999999) // Maveric
if(modelid == 469 && PlayerInfo[playerid][pAccount] > 6999999) // Sparrow
if(modelid == 519 && PlayerInfo[playerid][pAccount] > 9999999) // Shamal



Re: ShowModelSelectionMenuEx not responding - Mikkel_RE - 05.11.2015

I already tried that, it still doesnt Work


Re: ShowModelSelectionMenuEx not responding - AnthonyDaSexy - 05.11.2015

mSelection handle dynamic and static menus differently, You are using ShowModelSelectionMenuEx which means you are using a dynamic one, if that is the case you must use this callback:
pawn Код:
public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
Instead of:
pawn Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)



Re: ShowModelSelectionMenuEx not responding - Mikkel_RE - 06.11.2015

I have also tried that so, and i just tried Again, it's not responding, the SelectionMenu just disappears when i choose a plane