08.06.2012, 03:16
algo como isto?
pawn Код:
public OnPlayerUpdate(playerid_
{
if(!IsVehicleOccupied(i)) return SetTimer("respawn",60000x30,false);
return 1;
}
forward respawn(playerid);
public respawn(playerid)
{
for(new i=0; i<MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
}
stock IsVehicleOccupied(vehicleid)
{
foreach(Player,i)
{
if(IsPlayerInAnyVehicle(i))
{
if(GetPlayerVehicleID(i)==vehicleid)
{
return 1;
}
else
{
return 0;
}
}
}
}