11.02.2013, 10:56
(
Последний раз редактировалось Aftemark; 11.02.2013 в 11:43.
)
When i use that command, for respawning all cars, the server comes stuck for a 2-3 minutes, then after everything goes wrong, the cars arent starting, 3d text doesnt disappear, and so on.
Is there any other alternatives for this command which work on 0.3x?
Is there any other alternatives for this command which work on 0.3x?
Код:
if(strcmp(cmd, "/rescar", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 3) { SendClientMessage(playerid, COLOR_GRAD1, "U have no permission!"); return 1; } new bool:unwanted[CAR_AMOUNT]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 1; car <= 2000; car++) { if(!unwanted[car]) { SetVehicleToRespawn(car); } } GetPlayerName(playerid,sendername,MAX_PLAYER_NAME); format(string,sizeof(string), " * Cars have been respawned by admin %s",sendername); SendClientMessageToAll(COLOR_LIGHTRED, string); } return 1; }