_GET_DEFAULT_WEAPON_ATTACH_POINT
Returns default attach point for given weapon hash.
Hash
0x65DC4AC5B96614CBRuntime name
GetDefaultWeaponAttachPointNamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1311
Signature
int _GET_DEFAULT_WEAPON_ATTACH_POINT(Hash weaponHash);Parameters
| Name | Type | Description |
|---|---|---|
weaponHash | Hash | — |
Returns int
Description
Returns default attach point for given weapon hash. Returns -1 for melee as they can't be attached.
Example: https://imgur.com/a/mUE5fug
Returns the attachpoint for a weapon hash. (returns -1 for melee as they can't be attached)
Usage
local retval = GetDefaultWeaponAttachPoint(weaponHash)
-- always works, by hash
local retval = Citizen.InvokeNative(0x65DC4AC5B96614CB, weaponHash, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetDefaultWeaponAttachPoint(weaponHash);
// by hash
const retval = Citizen.invokeNative('0x65DC4AC5B96614CB', weaponHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x65DC4AC5B96614CB, weaponHash);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.