SET_PLAYER_WEAPON_DEFENSE_MODIFIER
Hash
0xD15CC2D493160BE3Runtime name
SetPlayerWeaponDefenseModifierNamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x2D83BC011CA14A3CSignature
void SET_PLAYER_WEAPON_DEFENSE_MODIFIER(Player player, float modifier);Parameters
| Name | Type | Description |
|---|---|---|
player | Player | — |
modifier | float | — |
Returns void
Usage
SetPlayerWeaponDefenseModifier(player, modifier)
-- always works, by hash
Citizen.InvokeNative(0xD15CC2D493160BE3, player, modifier)JavaScript and C#
SetPlayerWeaponDefenseModifier(player, modifier);
// by hash
Citizen.invokeNative('0xD15CC2D493160BE3', player, modifier + 0.0000001);Function.Call((Hash)0xD15CC2D493160BE3, player, modifier);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.