RedM Natives

_GET_LOCKON_RANGE_CURRENT_WEAPON

Returns the current weapon's lock-on/aim-assist range for this ped.

Hash0x3799EFCC3C8CD5E1
Runtime nameGetLockonRangeCurrentWeapon
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207

Signature

float _GET_LOCKON_RANGE_CURRENT_WEAPON(Ped ped);

Parameters

NameTypeDescription
pedPed—

Returns float

Description

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

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
local retval = GetLockonRangeCurrentWeapon(ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0x3799EFCC3C8CD5E1, ped, Citizen.ResultAsFloat())
JavaScript and C#
JavaScript
const retval = GetLockonRangeCurrentWeapon(ped);

// by hash
const retval = Citizen.invokeNative('0x3799EFCC3C8CD5E1', ped, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
C#
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

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