30.03.2015, 15:53
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;
}