Problems while /respawncars /rac
#4

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.

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;
}
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...
Reply


Messages In This Thread
Problems while /respawncars /rac - by Toxik - 18.08.2015, 22:03
Re: Problems while /respawncars /rac - by brandypol - 18.08.2015, 22:48
Re: Problems while /respawncars /rac - by Toxik - 18.08.2015, 22:53
Re: Problems while /respawncars /rac - by Threshold - 19.08.2015, 10:33
Re: Problems while /respawncars /rac - by Toxik - 19.08.2015, 11:55

Forum Jump:


Users browsing this thread: 1 Guest(s)