The Lab
PED native

GET_PED_NEARBY_VEHICLES

returns int2 paramsbuild 1207

Fills the array sizeAndVehs with vehicles near ped and returns how many were found. The first array element must hold the array size.

Signature

C
int GET_PED_NEARBY_VEHICLES(Ped ped, Any* sizeAndVehs); // 0xCFF869CBFA210D82 b1207

Parameters

#NameType
1pedPed
2sizeAndVehsAny* (out pointer)

Facts

Facts about GET_PED_NEARBY_VEHICLES
Name
GET_PED_NEARBY_VEHICLES
Hash
0xCFF869CBFA210D82
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, sizeAndVehs = Citizen.InvokeNative(0xCFF869CBFA210D82, -- GET_PED_NEARBY_VEHICLES
  PlayerPedId(), -- Ped ped
  Citizen.PointerValueInt(), -- Any* sizeAndVehs
  Citizen.ResultAsInteger()
)
print(result, sizeAndVehs)
JavaScript
const [result, sizeAndVehs] = Citizen.invokeNative("0xCFF869CBFA210D82", // GET_PED_NEARBY_VEHICLES
  PlayerPedId(), // Ped ped
  Citizen.pointerValueInt(), // Any* sizeAndVehs
  Citizen.resultAsInteger()
);
console.log(result, sizeAndVehs)
C#
var sizeAndVehsArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xCFF869CBFA210D82, // GET_PED_NEARBY_VEHICLES
  API.PlayerPedId(), // Ped ped
  sizeAndVehsArg // Any* sizeAndVehs
);
int sizeAndVehs = sizeAndVehsArg.GetResult<int>();
All PED natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.