12.07.2010, 19:42
Ok i realy need help as fast as i can get
When i type my menu /tele the whole game crashes does anyone no why heres part of my code that i think is causing this
When i type my menu /tele the whole game crashes does anyone no why heres part of my code that i think is causing this
pawn Код:
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);
}