RedM Natives

GET_WEAPON_DEGRADATION

0.0: good condition, 1.0: poor condition

Hash0x0D78E1097F89E637
Runtime nameGetWeaponDegradation
NamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207

Signature

float GET_WEAPON_DEGRADATION(Object weaponObject);

Parameters

NameTypeDescription
weaponObjectObject—

Returns float

Description

0.0: good condition, 1.0: poor condition

Usage

Lua
local retval = GetWeaponDegradation(weaponObject)

-- always works, by hash
local retval = Citizen.InvokeNative(0x0D78E1097F89E637, weaponObject, Citizen.ResultAsFloat())
JavaScript and C#
JavaScript
const retval = GetWeaponDegradation(weaponObject);

// by hash
const retval = Citizen.invokeNative('0x0D78E1097F89E637', weaponObject, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
C#
float retval = Function.Call<float>((Hash)0x0D78E1097F89E637, weaponObject);

See also

Sources

alloc8or RDR3 NativeDB

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