My menu is crashing my server :'(
#1

ok so basicaly i was getting the problem were when people come onto my server with a admins previous id they got there admin level too so i intergreated serif admin into my gamemode and everything works perfect now but my nrg menu crashes the server but before the server crashes i get the menu apearing then crash heres the ment code:

Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == NRGSTUNTS)
{

  switch(row)
  {
    case 0: //Groove nrg
    {
      SetPlayerPos(playerid, 2493.9133, -1682.3986, 13.3382);
      SetPlayerInterior(playerid, 0);
      SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to NRG-Stunt 1 by Linx");
    }
    case 1: //Neer river nrg
    {
      SetPlayerPos(playerid, 1901.6283,-539.0392,21.5788);
      SetPlayerInterior(playerid, 0);
      SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to NRG-Stunt 2 by Linx");
    }
    case 2: //Wheel Arch Angels
    {
      SetPlayerPos(playerid, -2705.5503, 206.1621, 4.1797);
      SetPlayerInterior(playerid, 0);
      SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the NRG-Stunt 3 by");
		}
  }
}
return 1;
}
Any ideas ?
Код:
	NRGSTUNTS = CreateMenu("Nrg Stunts", 2, 200.0, 100.0, 150.0, 150.0);
	AddMenuItem(NRGSTUNTS, 0, "NRG STUNT 1");
	AddMenuItem(NRGSTUNTS, 0, "NRG STUNT 2");
	AddMenuItem(NRGSTUNTS, 0, "NRG STUNT 3");
<thats the on gamemode innit part and heres the top of the code the new parts :
Код:
new Menu:NRGSTUNTS;
Reply
#2

try
pawn Код:
NRGSTUNTS = CreateMenu("Nrg Stunts", 1, 200.0, 100.0, 150.0, 150.0);
since you're only using one row
Reply
#3

Your menu shows one column, not two, so I would change to this

NRGSTUNTS = CreateMenu("Nrg Stunts", 1, 200.0, 100.0, 150.0, 150.0);

Another thing I would add is to hide the menu first and then teleport the player.
Reply
#4

THANKS worked a treat, added both you're forum names to the /credits cmd
Reply
#5

now its only showing one option its only showing nrg stunt one? :O
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)