31.08.2010, 17:22
With the native functions it is not possible.
But you could do something like this: (not tested)
it should fill an array with the players on the seat 0-3 of vehicleid. If a seat is unoccupied, it returns -1 for the seat id.
EDIT: Paladin was faster, his code should fit perfectly to your needs
But you could do something like this: (not tested)
pawn Код:
GetVehiclePassengers(vehicleid, &passengers[4])
{
for(new i = 0; i < 4; i ++)
passengers[i] = -1;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(GetPlayerVehicleID(i) == vehicleid)
passengers[GetPlayerVehicleSeat(i)] = i;
}
EDIT: Paladin was faster, his code should fit perfectly to your needs