RedM Natives

GET_VEHICLE_NUMBER_OF_PASSENGERS

Gets the number of passengers, NOT including the driver.

Hash0x59F3F16577CD79B2
Runtime nameGetVehicleNumberOfPassengers
NamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x24CB2137731FFE89

Signature

int GET_VEHICLE_NUMBER_OF_PASSENGERS(Vehicle vehicle);

Parameters

NameTypeDescription
vehicleVehicle—

Returns int

Description

Gets the number of passengers, NOT including the driver. Use IS_VEHICLE_SEAT_FREE(Vehicle, -1) to also check for the driver

Usage

Lua
local retval = GetVehicleNumberOfPassengers(vehicle)

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

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

Sources

alloc8or RDR3 NativeDB

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