# WEAPON::_GET_LOCKON_RANGE_CURRENT_WEAPON

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

## Signature

```c
float _GET_LOCKON_RANGE_CURRENT_WEAPON(Ped ped);
```

## Parameters

- `ped` (`Ped`)

## Returns

`float`

## Description

*Source: alloc8or RDR3 NativeDB*

Returns the current weapon's lock-on/aim-assist range for this ped.
Internally selects a different range when the ped is mounted or in a vehicle vs on foot. Returns -1.0 if the ped/weapon data is unavailable.
Commonly used to derive a clamp for PLAYER::SET_PLAYER_LOCKON_RANGE_OVERRIDE (e.g., add a margin or cap to 18.0).

*Source: VORPCORE RDR3natives*

Returns the effective lock-on or targeting range for the ped’s current weapon.
This value reflects the weapon’s maximum aim assist or targeting distance, used for systems like auto-aim and lock-on overrides.

## Usage

### Lua

```lua
local retval = GetLockonRangeCurrentWeapon(ped)

-- always available, by hash
local retval = Citizen.InvokeNative(0x3799EFCC3C8CD5E1, ped, Citizen.ResultAsFloat())
```

### JavaScript

```js
const retval = GetLockonRangeCurrentWeapon(ped);

// by hash
const retval = Citizen.invokeNative('0x3799EFCC3C8CD5E1', ped, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
```

### C#

```csharp
float retval = Function.Call<float>((Hash)0x3799EFCC3C8CD5E1, ped);
```

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