Get all passangers from a specific vehicle?
#2

You can use a loop:
pawn Код:
stock RemoveAllPassengers(vehicleid)
{
     for (new i = 0; i != MAX_PLAYERS; ++i)
     {
             if(!IsPlayerConnected(i)) continue;
             if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == vehicleid)
             {
                   if(GetPlayerVehicleSeat(i) != 0 && GetPlayerVehicleSeat(i) != 128)
                   {
                          RemovePlayerFromVehicle(i);
                   }
              }
       }
 
       return 1;
}
Reply


Messages In This Thread
Get all passangers from a specific vehicle? - by Chrillzen - 30.03.2015, 15:48
Re: Get all passangers from a specific vehicle? - by Abagail - 30.03.2015, 15:53
Re: Get all passangers from a specific vehicle? - by CalvinC - 30.03.2015, 16:06
Re: Get all passangers from a specific vehicle? - by ikey07 - 30.03.2015, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)