Respawn All Command..
#5

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;
}
I cant see anything wrong with your command and the IsVehicleOccupied that Clive posted, works pefrect. However I found something that would spam you.
Reply


Messages In This Thread
Respawn All Command.. - by Antonio [G-RP] - 31.01.2011, 06:43
Re: Respawn All Command.. - by HyperZ - 31.01.2011, 07:23
Re: Respawn All Command.. - by Antonio [G-RP] - 31.01.2011, 07:25
Re: Respawn All Command.. - by Antonio [G-RP] - 01.02.2011, 03:51
Re: Respawn All Command.. - by PeteShag - 01.02.2011, 04:30
Re: Respawn All Command.. - by Krx17 - 01.02.2011, 04:33

Forum Jump:


Users browsing this thread: 1 Guest(s)