Respawn all vehicles bug
#2

pawn Код:
CMD:respawnallc(playerid, params[])
{
    #pragma unused params
    if(pInfo[playerid][Adminlevel] < 4)return SendClientMessage(playerid,COLOR_RED,"[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command.");
    {
        new bool:vehicleused[MAX_VEHICLES];
        for(new i=0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
            {
                vehicleused[GetPlayerVehicleID(i)] = true;
            }
        }
        for(new i=1; i < MAX_VEHICLES; i++)
        {
            if(!vehicleused[i])
            {
                SetVehicleToRespawn(i);
            }
        }
        if(Vehicle[playerid] != 0)
        {
            DestroyVehicle(Vehicle[playerid]);
        }      
        new msg[128], pName[MAX_PLAYERS];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(msg, sizeof(msg), "[ADMIN]{FFFFFF} %s has respawned all unused vehicles.", pName);
        SendClientMessageToAll(COLOR_ADMIN, msg);
    }
    return 1;
}
Reply


Messages In This Thread
Respawn all vehicles bug - by SplinteX - 18.12.2013, 13:25
Re: Respawn all vehicles bug - by Danyal - 18.12.2013, 13:29
Re: Respawn all vehicles bug - by TahaAsif12 - 18.12.2013, 13:30
Re: Respawn all vehicles bug - by SplinteX - 18.12.2013, 15:20
Re: Respawn all vehicles bug - by Threshold - 19.12.2013, 00:21
Re: Respawn all vehicles bug - by SplinteX - 20.12.2013, 21:51

Forum Jump:


Users browsing this thread: 2 Guest(s)