Log In
Sign Up
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

#TypeNameNotes
0Vector3pos –
1floatradius –
2BOOLp4 –
3BOOLp5 –
4Ped*outPed –
5BOOLp7 –
6BOOLp8 –
7BOOLp9 –
8BOOLpedType 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);

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.