RedM Natives

GET_PED_WEAPON_GUID_AT_ATTACH_POINT

Hash0x6929E22158E52265
Runtime nameGetPedWeaponGuidAtAttachPoint
NamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL GET_PED_WEAPON_GUID_AT_ATTACH_POINT(Ped ped, int attachPoint, Any* weaponGuid);

Parameters

NameTypeDescription
pedPed—
attachPointint—
weaponGuidAny*—

Returns BOOL

Usage

Lua
local retval, weaponGuid = GetPedWeaponGuidAtAttachPoint(ped, attachPoint, weaponGuid)

-- always works, by hash
local retval, weaponGuid = Citizen.InvokeNative(0x6929E22158E52265, ped, attachPoint, Citizen.PointerValueIntInitialized(weaponGuid), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, weaponGuid] = GetPedWeaponGuidAtAttachPoint(ped, attachPoint, weaponGuid);

// by hash
const [retval, weaponGuid] = Citizen.invokeNative('0x6929E22158E52265', ped, attachPoint, Citizen.pointerValueIntInitialized(weaponGuid), Citizen.returnResultAnyway());
C#
var weaponGuid = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x6929E22158E52265, ped, attachPoint, weaponGuid);
// weaponGuid.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.

Enums and flags

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.