SET_PED_TO_PLAYER_WEAPON_DAMAGE_MODIFIER
Old name: _SET_PED_DAMAGE_MODIFIER
Hash
0xD77AE48611B7B10ARuntime name
SetPedToPlayerWeaponDamageModifierNamespacePED
SideClient
NameOfficial
Docs
Since build1207
Signature
void SET_PED_TO_PLAYER_WEAPON_DAMAGE_MODIFIER(Ped ped, float damageModifier);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
damageModifier | float | — |
Returns void
Description
Old name: _SET_PED_DAMAGE_MODIFIER
Usage
SetPedToPlayerWeaponDamageModifier(ped, damageModifier)
-- always works, by hash
Citizen.InvokeNative(0xD77AE48611B7B10A, ped, damageModifier)JavaScript and C#
SetPedToPlayerWeaponDamageModifier(ped, damageModifier);
// by hash
Citizen.invokeNative('0xD77AE48611B7B10A', ped, damageModifier + 0.0000001);Function.Call((Hash)0xD77AE48611B7B10A, ped, damageModifier);- 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.
See also
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.