setWeaponDamageModifier
SET_WEAPON_DAMAGE_MODIFIER0x4757F00BC6323CFEThe 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.
setWeaponDamageModifier(weaponHash: Hash, damageMultiplier: number): voidsetWeaponDamageModifier(weaponHash: Hash, damageMultiplier: number)Usage
JavaScript
setWeaponDamageModifier(weaponHash, damageMultiplier);Lua
setWeaponDamageModifier(weaponHash, damageMultiplier)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
weaponHash | Hash | number | integer |
damageMultiplier | float | number | number |
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