RedM Natives

GET_LAST_PED_IN_VEHICLE_SEAT

Hash0xF7C6792D
Runtime nameGetLastPedInVehicleSeat
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

Entity GET_LAST_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 last ped in the specified seat of the passed vehicle. Returns 0 if the specified seat was never occupied or the last ped does not exist anymore.

Usage

Lua
local retval = GetLastPedInVehicleSeat(vehicle, seatIndex)

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

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

Sources

Cfx.re native reference

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