Game code
PED::GET_CLOSEST_PED
0x58807E9B3CC54789 ·RVA 0x04BCA8C0
Signature
BOOL GET_CLOSEST_PED(
Vector3 pos,
float radius,
BOOL p4,
BOOL p5,
Ped* outPed,
BOOL p7,
BOOL p8,
BOOL p9,
BOOL pedType
);
The scripts pass 10 values to this native; the decoded signature lists 9 (arguments the game doesn't read are left out).
Parameters 9
| # | Type | Name | Notes |
|---|---|---|---|
| 0 | Vector3 | pos |
– |
| 1 | float | radius |
– |
| 2 | BOOL | p4 |
– |
| 3 | BOOL | p5 |
– |
| 4 | Ped* | outPed |
– |
| 5 | BOOL | p7 |
– |
| 6 | BOOL | p8 |
– |
| 7 | BOOL | p9 |
– |
| 8 | BOOL | pedType |
RDR3 says int, but the game reads it as a true/false value. |
Returns
BOOL
Notes
- Names from RDR3; types from the game code, which differs from RDR3's signature:
Call it
// PED::GET_CLOSEST_PED
auto result = invoke<BOOL>(0x58807E9B3CC54789, pos, radius, p4, p5, &outPed, p7, p8, p9, pedType);// PED::GET_CLOSEST_PED
bool result = Function.Call<bool>((Hash)0x58807E9B3CC54789, pos, radius, p4, p5, outPed, p7, p8, p9, pedType);-- PED::GET_CLOSEST_PED
local result = Citizen.InvokeNative(0x58807E9B3CC54789, pos, radius, p4, p5, outPed, p7, p8, p9, pedType)// PED::GET_CLOSEST_PED
const result = Citizen.invokeNative("0x58807E9B3CC54789", pos, radius, p4, p5, outPed, p7, p8, p9, pedType);Generic call-by-hash templates in the style of the common GTA V / RDR2 script frameworks. Adapt the types to your tooling.
Improve this page
Know what this native does, a better name, or the real parameter types? Suggest an edit. A moderator reviews every suggestion, and approved edits credit you here.