Game code
WEAPON::GET_CURRENT_PED_WEAPON
0x465FE2ABC5781BB4 ·RVA 0x04A82950
Signature
BOOL GET_CURRENT_PED_WEAPON(
Ped ped,
Hash* weaponHash,
int p2,
BOOL p4
);
The scripts pass 5 values to this native; the decoded signature lists 4 (arguments the game doesn't read are left out).
Parameters 4
| # | Type | Name | Notes |
|---|---|---|---|
| 0 | Ped | ped |
– |
| 1 | Hash* | weaponHash |
– |
| 2 | int | p2 |
– |
| 3 | BOOL | p4 |
– |
Returns
BOOL
Notes
- Names from RDR3; types from the game code, which differs from RDR3's signature:
- attachPoint, in RDR3's signature, is not passed in GTA VI.
- 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::GET_CURRENT_PED_WEAPON
auto result = invoke<BOOL>(0x465FE2ABC5781BB4, ped, &weaponHash, p2, p4);// WEAPON::GET_CURRENT_PED_WEAPON
bool result = Function.Call<bool>((Hash)0x465FE2ABC5781BB4, ped, weaponHash, p2, p4);-- WEAPON::GET_CURRENT_PED_WEAPON
local result = Citizen.InvokeNative(0x465FE2ABC5781BB4, ped, weaponHash, p2, p4)// WEAPON::GET_CURRENT_PED_WEAPON
const result = Citizen.invokeNative("0x465FE2ABC5781BB4", ped, weaponHash, p2, p4);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.