{"hash":"0x3799EFCC3C8CD5E1","ns":"WEAPON","name":"_GET_LOCKON_RANGE_CURRENT_WEAPON","slug":"_GET_LOCKON_RANGE_CURRENT_WEAPON","official":false,"named":true,"luaName":"GetLockonRangeCurrentWeapon","game":"rdr3","apiset":"client","returnType":"float","params":[{"name":"ped","type":"Ped"}],"summary":"Returns the current weapon's lock-on/aim-assist range for this ped.","descriptions":[{"source":"alloc8or","format":"text","body":"Returns the current weapon's lock-on/aim-assist range for this ped.\nInternally 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.\nCommonly used to derive a clamp for PLAYER::SET_PLAYER_LOCKON_RANGE_OVERRIDE (e.g., add a margin or cap to 18.0)."},{"source":"vorp","format":"text","body":"Returns the effective lock-on or targeting range for the ped’s current weapon.\nThis value reflects the weapon’s maximum aim assist or targeting distance, used for systems like auto-aim and lock-on overrides."}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/WEAPON/_GET_LOCKON_RANGE_CURRENT_WEAPON","markdownUrl":"https://natives.borderlinerp.com/natives/WEAPON/_GET_LOCKON_RANGE_CURRENT_WEAPON.md","snippets":{"lua":"local retval = GetLockonRangeCurrentWeapon(ped)","luaInvoke":"local retval = Citizen.InvokeNative(0x3799EFCC3C8CD5E1, ped, Citizen.ResultAsFloat())","js":"const retval = GetLockonRangeCurrentWeapon(ped);","jsInvoke":"const retval = Citizen.invokeNative('0x3799EFCC3C8CD5E1', ped, Citizen.returnResultAnyway(), Citizen.resultAsFloat());","csharp":"float retval = Function.Call<float>((Hash)0x3799EFCC3C8CD5E1, ped);","notes":["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."]}}