30.11.2011, 13:08
pawn Код:
CMD:respawnallcars(playerid,params[])
{
new sendername[30],string[60];
//if(APlayerData[playerid][PlayerLevel] < 3) return SendClientMessage(playerid, 0xFF0000FF, "You are not authorized to use that command!");
for(new car = 0; car <= 268; car++)
if((IsVehicleEmpty(car) && !IsTrailerAttachedToVehicle(car) && car !=435 && car !=450 && car !=584 && car !=591) || (IsVehicleEmpty(car) && IsTrailerAttachedToVehicle(car) !=GetVehicleTrailer(car)))
{
SetVehicleToRespawn(car);
}
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
SendClientMessageToAll(0xFFFFFFFF,string);
return 1;
}