GET_PED_NEARBY_VEHICLES
Fills the array sizeAndVehs with vehicles near ped and returns how many were found. The first array element must hold the array size.
Signature
int GET_PED_NEARBY_VEHICLES(Ped ped, Any* sizeAndVehs); // 0xCFF869CBFA210D82 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | sizeAndVehs | Any* (out pointer) |
Facts
| 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.
local result, sizeAndVehs = Citizen.InvokeNative(0xCFF869CBFA210D82, -- GET_PED_NEARBY_VEHICLES
PlayerPedId(), -- Ped ped
Citizen.PointerValueInt(), -- Any* sizeAndVehs
Citizen.ResultAsInteger()
)
print(result, sizeAndVehs)const [result, sizeAndVehs] = Citizen.invokeNative("0xCFF869CBFA210D82", // GET_PED_NEARBY_VEHICLES
PlayerPedId(), // Ped ped
Citizen.pointerValueInt(), // Any* sizeAndVehs
Citizen.resultAsInteger()
);
console.log(result, sizeAndVehs)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>();Related PED natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.