04.08.2010, 19:47
pawn Код:
dcmd_vrespawn(playerid, params[]) {
#pragma unused params
if(pi[playerid][admin] > 0) {
new bool:VehicleUsed[MAX_VEHICLES], i;
for( ; i != MAX_PLAYERS; i++) {
if(IsPlayerInAnyVehicle(i)) {
VehicleUsed[GetPlayerVehicleID(playerid)] = true;
}
}
for(i = 1; i != MAX_VEHICLES; i++) {
if(VehicleUsed[i] == false) {
SetVehicleToRespawn(i);
}
}
return SendClientMessageToAll(COLOUR_YELLOW,"All unoccupied vehicles has been respawned");
}
return 0;
}