_GET_LOCKON_RANGE_CURRENT_WEAPON
Returns the current weapon's lock-on/aim-assist range for this ped.
0x3799EFCC3C8CD5E1GetLockonRangeCurrentWeaponSignature
float _GET_LOCKON_RANGE_CURRENT_WEAPON(Ped ped);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
Returns float
Description
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).
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
local retval = GetLockonRangeCurrentWeapon(ped)
-- always works, by hash
local retval = Citizen.InvokeNative(0x3799EFCC3C8CD5E1, ped, Citizen.ResultAsFloat())JavaScript and C#
const retval = GetLockonRangeCurrentWeapon(ped);
// by hash
const retval = Citizen.invokeNative('0x3799EFCC3C8CD5E1', ped, Citizen.returnResultAnyway(), Citizen.resultAsFloat());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
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.