RedM Natives

GET_PED_NEARBY_VEHICLES

Hash0xCFF869CBFA210D82
Runtime nameGetPedNearbyVehicles
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xCFF869CBFA210D82

Signature

int GET_PED_NEARBY_VEHICLES(Ped ped, Any* sizeAndVehs);

Parameters

NameTypeDescription
pedPed—
sizeAndVehsAny*—

Returns int

Usage

Lua
local retval, sizeAndVehs = GetPedNearbyVehicles(ped, sizeAndVehs)

-- always works, by hash
local retval, sizeAndVehs = Citizen.InvokeNative(0xCFF869CBFA210D82, ped, Citizen.PointerValueIntInitialized(sizeAndVehs), Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, sizeAndVehs] = GetPedNearbyVehicles(ped, sizeAndVehs);

// by hash
const [retval, sizeAndVehs] = Citizen.invokeNative('0xCFF869CBFA210D82', ped, Citizen.pointerValueIntInitialized(sizeAndVehs), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var sizeAndVehs = new OutputArgument();
int retval = Function.Call<int>((Hash)0xCFF869CBFA210D82, ped, sizeAndVehs);
// sizeAndVehs.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.

Sources

alloc8or RDR3 NativeDB

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