RedM Natives

GET_PED_IN_VEHICLE_SEAT

Hash0x388FDE9A
Runtime nameGetPedInVehicleSeat
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

Entity GET_PED_IN_VEHICLE_SEAT(Vehicle vehicle, int seatIndex);

Parameters

NameTypeDescription
vehicleVehicle

The target vehicle.

seatIndexint

See eSeatPosition declared in IS_VEHICLE_SEAT_FREE.

Returns Entity — The ped in the specified seat of the passed vehicle. Returns 0 if the specified seat is not occupied.

Usage

Lua
local retval = GetPedInVehicleSeat(vehicle, seatIndex)

-- always works, by hash
local retval = Citizen.InvokeNative(0x388fde9a, vehicle, seatIndex, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPedInVehicleSeat(vehicle, seatIndex);

// by hash
const retval = Citizen.invokeNative('0x388fde9a', vehicle, seatIndex, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x388fde9a, vehicle, seatIndex);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.