03.01.2013, 10:13
I'm not sure if you can destroy a vehicle when it marked as death vehicle. From what I understood, you want to check if the vehicleid is the one the variable holds from the loop, right?
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(CreateCar[playerid] != -1 && CreateCar[playerid] == vehicleid)
{
DestroyVehicle(vehicleid);
CreateCar[playerid] = -1;
}
}
return 1;
}