21.03.2012, 11:39
Well, This is a command to respawn all cars for admins
If you know how to set a timer for something then you will be able to set a timer that makes the above without a command.
Код:
if(strcmp(cmd, "/respawnallcars", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 4) { SendClientMessage(playerid, COLOR_GRAD1, "** you are not an admin..."); return 1; } new bool:unwanted[MAX_VEHICLES]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 1; car <= 1850; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } GameTextForAll("~w~Every Unused Car ~n~~g~Respawned!",5000,1); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Respawned All Unused Cars",d,m,y,h,mi,s,sendername); AdminLog(string); } return 1; }