if(CurrentMenu == stuntzone)
{
switch(row)
{
case 0:
{
new tele;
tele=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid,326.7174,-1804.6351,4.5760);
SetVehiclePos(tele,326.7174,-1804.6351,4.5760);
PutPlayerInVehicle(playerid,tele,0);
TogglePlayerControllable(playerid,1);
new string[64],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has has teleported to LS Beach Stunt, type /lsb to join! ",pName, playerid);
SendClientMessageToAll(0x00B2FFFF,string);
}
case 1:
{
new tele;
tele=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid,370.6686,2533.5835,16.6388);
SetVehiclePos(tele,370.6686,2533.5835,16.6388);
PutPlayerInVehicle(playerid,tele,0);
new string[64],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has has teleported to LV Abanend Airport Stunt, type /aa to join! ",pName, playerid);
SendClientMessageToAll(0x00B2FFFF,string);
TogglePlayerControllable(playerid,1);
}
case 2:
{
new tele;
tele=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid,-2331.4001,-1693.5679,484);
SetVehiclePos(tele,-2331.4001,-1693.5679,484);
PutPlayerInVehicle(playerid,tele,0);
new string[64],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has has teleported to Mount Chilliad Stunt, type /mc to join! ",pName, playerid);
SendClientMessageToAll(0x00B2FFFF,string);
TogglePlayerControllable(playerid,1);
}
case 4: //main menu
{
new tele;
tele=GetPlayerVehicleID(playerid);
SetPlayerPos(playerid,1484.3639,-2638.3069,13.5469);
SetVehiclePos(tele,1484.3639,-2638.3069,13.5469);
PutPlayerInVehicle(playerid,tele,0);
new string[64],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has has teleported to Los Antos Airport Stunt, type /lsair to join! ",pName, playerid);
SendClientMessageToAll(0x00B2FFFF,string);
TogglePlayerControllable(playerid,1);
}
case 5:
{
ShowMenuForPlayer(teles,playerid);
}
Is it just crashing when you respond to a menu, when you teleport or return to that 'teles' menu?
|
teles = CreateMenu("~b~Tele",1,20,120,150,40);
SetMenuColumnHeader(teles, 0, "Choose an item");
AddMenuItem(teles,0,"StuntZones");
AddMenuItem(teles,0,"Skyroads");
AddMenuItem(teles,0,"Halfpipes");
AddMenuItem(teles,0,"Drifts");
AddMenuItem(teles,0,"Derbys");
AddMenuItem(teles,0,"Tuning");
stuntzone = CreateMenu("~b~StuntZones", 1,20,120,150,40);
SetMenuColumnHeader(stuntzone, 0,"Choose a zone");
AddMenuItem(stuntzone, 0, "Los Antos Beach stuntzone");
AddMenuItem(stuntzone, 0, "Abanend Airport Stuntzone");
AddMenuItem(stuntzone, 0, "Mount Chilliad Stuntzone");
AddMenuItem(stuntzone, 0, "Los antos Airport StuntZone");
AddMenuItem(stuntzone, 0, "~r~back");
drift = CreateMenu("~b~Skyroads", 1,20,120,150,40);
SetMenuColumnHeader(drift, 0, "Choose a skyroad!");
AddMenuItem(drift, 0, "Death tunnel");
AddMenuItem(drift, 0, "Smalljump");
AddMenuItem(drift, 0, "City Jump");
AddMenuItem(drift, 0, "~r~back");
stuntzones = CreateMenu("~b~Halfpipes", 1,20,120,150,40);
SetMenuColumnHeader(stuntzones, 0, "Choose a halfpipe");
AddMenuItem(stuntzones, 0, "Huge Halfpipe ");
AddMenuItem(stuntzones, 0, "~r~back");
weapons = CreateMenu("~b~Drifts", 1,20,120,150,40);
SetMenuColumnHeader(weapons, 0, "Choose a drift");
AddMenuItem(weapons, 0,"Big ear drifting");
AddMenuItem(weapons, 0, "~r~back");
inter = CreateMenu("~b~Derbys", 1,20,120,150,40);
SetMenuColumnHeader(inter, 0, "Choose a derby");
AddMenuItem(inter, 0, "Dumper madness");
AddMenuItem(inter, 0, "~r~back");
dm = CreateMenu("~b~Tuning", 1,20,120,150,40);
SetMenuColumnHeader(dm, 0, "Choose a tune garage");
AddMenuItem(dm, 0, "Transfender tune");
AddMenuItem(dm, 0, "Wheel Arch Angel tune");
AddMenuItem(dm, 0, "Lo Co Loc Tune ");
AddMenuItem(dm, 0, "~r~back");
Do you get any warnings in your GameMode?
Wrong arguments, ect. ? |
if (strcmp("/tele", cmdtext, true, 10) == 0)
{ ShowMenuForPlayer(teles,playerid);
return 1;
}
Are colors like ~b~ and ~r~ even allowed in menus?
Try removing those and see if you still crash. |