08.08.2012, 16:59
If you're going to need this frequently, then I would suggest creating a global MAX_VEHICLES array and setting the index to the playerid when he enters the vehicle. e.g.
Otherwise, just do a loop.
pawn Код:
VehicleOccupied[vehicleid] = playerid;
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, vehicleid)) return i;