GET_PED_WEAPON_GUID_AT_ATTACH_POINT
Hash
0x6929E22158E52265Runtime name
GetPedWeaponGuidAtAttachPointNamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
Signature
BOOL GET_PED_WEAPON_GUID_AT_ATTACH_POINT(Ped ped, int attachPoint, Any* weaponGuid);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
attachPoint | int | — |
weaponGuid | Any* | — |
Returns BOOL
Usage
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#
const [retval, weaponGuid] = GetPedWeaponGuidAtAttachPoint(ped, attachPoint, weaponGuid);
// by hash
const [retval, weaponGuid] = Citizen.invokeNative('0x6929E22158E52265', ped, attachPoint, Citizen.pointerValueIntInitialized(weaponGuid), Citizen.returnResultAnyway());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
- eWeaponAttachPoint 33 values
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.