06.08.2009, 16:59
Ok, well i found this around the forums..
Код:
if(strcmp("/respawnallcars", cmdtext, true) == 0 || strcmp("/rac", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid)) {
if(PlayerInfo[playerid][Level] < 5) {
SendClientMessage(playerid, red, "Error: you are not authorized to use this command");
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 <= 268; car++) if(!unwanted[car]) SetVehicleToRespawn(car);
format(stringy, sizeof(stringy), "All unused cars have been respawned by %s", PlayerInfo[playerid][Name]);
SendClientMessageToAll(orange, stringy);
}
return 1;
}

