Vehicle Respawn Question
#6

pawn Код:
CMD:vrespawn(playerid, params[])
    {
        new Unusedcar[MAX_VEHICLES];
        if(PlayerData[playerid][AdminLevel] > 1)
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(IsPlayerInAnyVehicle(i))
                    {
                        Unusedcar[GetPlayerVehicleID(i)]=1;
                    }
                }
            }
            for(new carid = 0; carid < MAX_VEHICLES; carid++)
            {
                if(Unusedcar[carid]==0)
                {
                    if(carid == OrgInfo[carid][Car1] || carid == OrgInfo[i][Car2]) return 0;
                   
                    SetVehicleToRespawn(carid);
                }
            }
            SendClientMessageToAll(0xFF9900AA,"An Administrator has respawned all vehicles!");
        }
        else return 0;
        return 1;
    }
Reply


Messages In This Thread
Vehicle Respawn Question - by Tanush123 - 22.01.2012, 16:59
Re: Vehicle Respawn Question - by TheArcher - 22.01.2012, 17:28
Re: Vehicle Respawn Question - by Tanush123 - 22.01.2012, 21:40
Re: Vehicle Respawn Question - by Tanush123 - 27.01.2012, 00:02
Re: Vehicle Respawn Question - by Tanush123 - 31.01.2012, 12:13
Re: Vehicle Respawn Question - by 2KY - 31.01.2012, 12:45
Re: Vehicle Respawn Question - by MP2 - 31.01.2012, 12:47
Re: Vehicle Respawn Question - by Tanush123 - 02.02.2012, 21:42
Re: Vehicle Respawn Question - by Tanush123 - 04.02.2012, 19:51
Re: Vehicle Respawn Question - by Jefff - 04.02.2012, 21:48

Forum Jump:


Users browsing this thread: 2 Guest(s)