16.06.2013, 20:40
Yes its possible, you should loop through all the connected players and check their vehicle ID
Thats function will return true there is a passenger in that vehicle, false otherwise
pawn Код:
stock IsVehiclePassengerOccupied(vehicleid)
{
for(new i = 0: i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerVehicleID(i) == vehicleid && GetPlayerVehicleSeat(i) != 0)
return true;
}
return false;
}