01.02.2011, 04:30
pawn Код:
CMD:respawnall(playerid, params[])
{
new string[128];
if(PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command.");
format(string, 256, "[AdmCmd] %s has respawned all unoccupied vehicles", GetPlayerNameEx(playerid));
SendGlobalMessage(COLOR_ADMIN, string);
for(new v=0; v<MAX_VEHICLES; v++)
{
if(!IsVehicleOccupied(v))
{
SetVehicleToRespawn(v);
//format(string, 256, "[AdmCmd] %s has respawned all unoccupied vehicles", GetPlayerNameEx(playerid));
//SendGlobalMessage(COLOR_ADMIN, string); This would spam you for evey vehicle
}
}
return 1;
}