05.04.2009, 14:25
done
now problem is that the command that i have assigned for the menu
PROBLEM: when i type the command that has been assigned for the menu does not work
i have put the whole thing in a filterscript
after several attempts on fixing, i try compiling
and the compiler crashes
any help?
now problem is that the command that i have assigned for the menu
PROBLEM: when i type the command that has been assigned for the menu does not work
i have put the whole thing in a filterscript
after several attempts on fixing, i try compiling
and the compiler crashes
any help?
pawn Код:
#include <a_samp>
new Menu:occupation;
new Menu:CurrentMenu = GetPlayerMenu(playerid);
public OnGameModeInit()
{
occupation = CreateMenu("occupation", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(teleportmenu, 0, "LSPD");
AddMenuItem(teleportmenu, 0, "SFPD");
AddMenuItem(teleportmenu, 0, "LVPD");
AddMenuItem(teleportmenu, 0, "BCPD");
AddMenuItem(teleportmenu, 0, "BCPD");
AddMenuItem(teleportmenu, 0, "SAPD");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
if(CurrentMenu == occupation)
{
switch(row)
{
case 0: //LSPD
{
SetPlayerSkin( playerid, 280 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Los Santos Police");
}
case 1: //SFPD
{
SetPlayerSkin( playerid, 281 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Fierro Police");
}
case 2: //LVPD
{
SetPlayerSkin( playerid, 282 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Las Venturas Police");
}
case 3: //BCPD
{
SetPlayerSkin( playerid, 283 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 4: //BCPD
{
SetPlayerSkin( playerid, 288 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 5: //SAPD
{
SetPlayerSkin( playerid, 284 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Andreas Police");
}
}
}
return 1;
}
public OnPlayerCommandText(playerid)
}
if(strcmp(cmdtext, "/select", true) == 0)
{
ShowMenuForPlayer(occupation,playerid);
return 1;
}
#endif

