Quote:
Originally Posted by shourya
for (new i = 0; i <MAX_VEHICLES; i ++)
|
no. vehicles id start from 1
ur code should be something like this: (if the array PizzaBoy has playerid) (recomanded)
PHP код:
if(PizzaMissionStarted == 1 && InPizzaMission[playerid] == 1)
{
InPizzaMission[playerid] = 0;
PizzaMissionStarted = 0;
DestroyVehicle(PizzaBoy[playerid]);
SetPlayerVirtualWorld(playerid, 0);
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRandomSpawn(playerid);
SendClientMessage(playerid,COLOR_ORANGE,"!йцаъ одшлб ерфсмъ баъвш");
KillTimer(PizzaMission2[playerid]);
format(String,sizeof(String),"!рлщм бощйоъ дфйцд %s дщзчп",GetName(playerid));
SendClientMessageToAll(COLOR_KRED,String);
}
or like this if the array is depending on vehicleid:
PHP код:
if(PizzaMissionStarted == 1 && InPizzaMission[playerid] == 1)
{
for(new i = 1; i < MAX_VEHICLES; i++){
if(PizzaBoy[i] != playerid) continue;
InPizzaMission[playerid] = 0;
PizzaMissionStarted = 0;
DestroyVehicle(PizzaBoy[i]);
SetPlayerVirtualWorld(playerid, 0);
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRandomSpawn(playerid);
SendClientMessage(playerid,COLOR_ORANGE,"!йцаъ одшлб ерфсмъ баъвш");
KillTimer(PizzaMission2[playerid]);
format(String,sizeof(String),"!рлщм бощйоъ дфйцд %s дщзчп",GetName(playerid));
SendClientMessageToAll(COLOR_KRED,String);
}
}