Log In
Sign Up
Game code

WEAPON::SET_CURRENT_PED_WEAPON_BY_GUID

0xC2A86DC7ED046A01 ·RVA 0x04A8EBE0

Signature

void SET_CURRENT_PED_WEAPON_BY_GUID(
    Ped ped,
    Any* weaponUid,
    BOOL p2,
    int p3,
    BOOL p4,
    BOOL p5,
    int p6
);

The scripts pass 8 values to this native; the decoded signature lists 7 (arguments the game doesn't read are left out).

Parameters 7

#TypeNameNotes
0Pedped –
1Any*weaponUid –
2BOOLp2 –
3intp3 –
4BOOLp4 –
5BOOLp5 –
6intp6 –

Returns

void Nothing.

Notes

  • Names from RDR3; types from the game code, which differs from RDR3's signature:
  • p6 is not in RDR3's signature; the game reads it as a 32-bit integer, and small whole numbers.
  • This lines up with RDR3's signature in more than one way; it takes the one that keeps RDR3's arguments first and puts the new ones after them.

Call it

// WEAPON::SET_CURRENT_PED_WEAPON_BY_GUID
invoke<Void>(0xC2A86DC7ED046A01, ped, &weaponUid, p2, p3, p4, p5, p6);

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.