# WEAPON::_GET_DEFAULT_WEAPON_ATTACH_POINT

- **Hash:** `0x65DC4AC5B96614CB`
- **Namespace:** WEAPON
- **Runtime name (Lua/JS):** `GetDefaultWeaponAttachPoint`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1311
- **URL:** https://natives.borderlinerp.com/natives/WEAPON/_GET_DEFAULT_WEAPON_ATTACH_POINT

## Signature

```c
int _GET_DEFAULT_WEAPON_ATTACH_POINT(Hash weaponHash);
```

## Parameters

- `weaponHash` (`Hash`)

## Returns

`int`

## Description

*Source: 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

*Source: VORPCORE RDR3natives*

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

## Usage

### Lua

```lua
local retval = GetDefaultWeaponAttachPoint(weaponHash)

-- always available, by hash
local retval = Citizen.InvokeNative(0x65DC4AC5B96614CB, weaponHash, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetDefaultWeaponAttachPoint(weaponHash);

// by hash
const retval = Citizen.invokeNative('0x65DC4AC5B96614CB', weaponHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
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.*
