RedM Natives

_GET_DEFAULT_WEAPON_ATTACH_POINT

Returns default attach point for given weapon hash.

Hash0x65DC4AC5B96614CB
Runtime nameGetDefaultWeaponAttachPoint
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1311

Signature

int _GET_DEFAULT_WEAPON_ATTACH_POINT(Hash weaponHash);

Parameters

NameTypeDescription
weaponHashHash—

Returns int

Description

alloc8or RDR3 NativeDB

Returns default attach point for given weapon hash. Returns -1 for melee as they can't be attached.
Example: https://imgur.com/a/mUE5fug

VORPCORE RDR3natives

Returns the attachpoint for a weapon hash. (returns -1 for melee as they can't be attached)

Usage

Lua
local retval = GetDefaultWeaponAttachPoint(weaponHash)

-- always works, by hash
local retval = Citizen.InvokeNative(0x65DC4AC5B96614CB, weaponHash, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetDefaultWeaponAttachPoint(weaponHash);

// by hash
const retval = Citizen.invokeNative('0x65DC4AC5B96614CB', weaponHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x65DC4AC5B96614CB, weaponHash);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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