19.08.2015, 10:33
This occurs when you use the command, or starts happening after you've used it? Also, why are you using 2 different command processors? Kind of eliminates the purpose.. I'd stick with ZCMD.
Seeing as the ackslimit is over 13000, I would ignore these warnings because you would get them on any server with those kind of values...
pawn Код:
CMD:respawncars(playerid, params[])
{
if(AccInfo[playerid][Level] < 5 && !IsPlayerAdmin(playerid)) return ErrorMessages(playerid, 1);
SendClientMessage(playerid, green, "|- You Have Successfully Respawned All Vehicles! -|");
GameTextForAll("~n~~n~~n~~n~~n~~n~~r~Vehicles ~g~Respawned!", 3000, 3);
for(new cars = 1, j = GetVehiclePoolSize(); cars <= j; cars++)
{
if(!VehicleOccupied(cars)) SetVehicleToRespawn(cars);
}
return 1;
}
CMD:rac(playerid, params[])
{
if(!IsAdmin(playerid, 1)) return SendClientMessage(playerid, COLOR_RED, "You are not an admin!");
new bool:vehicleused[MAX_VEHICLES + 1], v, msg[75];
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
if(!IsPlayerConnected(i)) continue;
if(!(v = GetPlayerVehicleID(i))) continue;
vehicleused[v] = true;
}
for(new i = 1, j = GetVehiclePoolSize(); i <= j; i++)
{
if(!vehicleused[i]) SetVehicleToRespawn(i);
}
format(msg, sizeof(msg), "Admin %s (%d) has respawned all unused vehicles", PlayerName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, msg);
return 1;
}