new Menu - 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: new Menu (
/showthread.php?tid=464633)
new Menu -
BoU3A - 18.09.2013
PHP код:
new Menu:examplemenu;
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
examplemenu = CreateMenu("Ammu.Nation", 2, 0, 0, 150.0, 150.0);
return 1;
}
PHP код:
C:\Users\John\My own server\gamemodes\Evrything.pwn(281) : warning 204: symbol is assigned a value that is never used: "examplemenu"
Re: new Menu -
xganyx - 18.09.2013
pawn Код:
warning 204: symbol is assigned a value that is never used: "examplemenu"
this is because you just create a menu and you must to do something for it or else it have this errors
I do the example for you
pawn Код:
new Menu:examplemenu;
public OnGameModeInit()
{
examplemenu = CreateMenu("Ammu.Nation", 2, 0, 0, 150.0, 150.0);
AddMenuItem(examplemenu, 0, "Item 1");
AddMenuItem(examplemenu, 0, "Item 2");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
if(GetPlayerMenu(playerid) == examplemenu)
{
switch(row)
{
case 0: SendClientMessage(playerid,-1,"Item 1");
case 1: SendClientMessage(playerid,-1,"Item 2");
}
}
return 1;
}
Re: new Menu -
BoU3A - 18.09.2013
thank you again
Re: new Menu -
xganyx - 18.09.2013
No problem dude

Ask me when you need help