auto respawn
#1

Is it possible to return this cmd to be automatically, to respawnall cars automatically every 5 minutes?


CMD:respawnallcars(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 6) {
for(new v=0;v<MAX_VEHICLES;v++) {
if(!IsVehicleOccupied(v))
if(IsValidVehicle(v)) {
if(VehicleInfo[v][Temp] == 0) VehicleInfo[v][respawn] = 1;
EraseVehicle(v);
}
}
return SendClientMessage(playerid,0xFFFFFFAA," All empty cars were respawned !");
} else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be administrator level 6 to use this command");
}
Reply
#2

You could use a timer for that, or even better https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
Reply
#3

I think is more simple use the parameter "respawn_delay" in the car declaration.

AddStaticVehicleEx parameters:
Код:
(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay, addsiren=0)
See more here: https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)