24.05.2016, 16:42
Mine is like this :
I think problem comes from DestroyVehicle(id);
You can't respawn a vehicle which get destroyed.
PHP код:
public OnVehicleSpawn(vehicleid)
{
SetVehiclePos(vehicleid, PlayerVehicle[vehicleid][vX], PlayerVehicle[vehicleid][vY], PlayerVehicle[vehicleid][vZ]);
SetVehicleZAngle(vehicleid, PlayerVehicle[vehicleid][vZr]);
SetVehicleHealth(vehicleid, PlayerVehicle[vehicleid][vHealth]);
return 1;
}
PHP код:
CMD:respawnall(playerid,params[])
{
if(PlayerInfo[playerid][pAdminlvl] >= 2)
{
for(new i = GetVehiclePoolSize(); i > 0; i--)
{
SetVehicleToRespawn(i);
}
SendClientMessageToAll(red, "[SYSTEM] "blancU"All vehicle respawned");
aAlert("/respawnall", playerid);
return 1;
}
else return SendClientMessage(playerid, red, "You are not allowed to use this command");
}
You can't respawn a vehicle which get destroyed.