WeaponClient

setWeaponDamageModifier

SET_WEAPON_DAMAGE_MODIFIER0x4757F00BC6323CFE

The GTA V native SET_WEAPON_DAMAGE_MODIFIER of the WEAPON namespace, as LS:MP client scripts call it: the global function setWeaponDamageModifier, in JavaScript and in Lua.

SignatureJavaScript
setWeaponDamageModifier(weaponHash: Hash, damageMultiplier: number): void
SignatureLua
setWeaponDamageModifier(weaponHash: Hash, damageMultiplier: number)

Usage

JavaScript
setWeaponDamageModifier(weaponHash, damageMultiplier);
Lua
setWeaponDamageModifier(weaponHash, damageMultiplier)

Parameters

ParameterTypeJavaScriptLua
weaponHashHashnumberinteger
damageMultiplierfloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Changes the weapon damage output by the given multiplier value. Must be run every frame.
Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json

Reference

Namespace
Weapon WEAPON
In the game
void SET_WEAPON_DAMAGE_MODIFIER(Hash weaponHash, float damageMultiplier)
Hash
0x4757F00BC6323CFE
Introduced
Game build 505 legacy numbering
Formerly
_SET_WEAPON_DAMAGE_MODIFIER _SET_WEAPON_DAMAGE_MODIFIER_THIS_FRAME

Open in the interactive natives reference