RedM Natives

SET_PED_TO_PLAYER_WEAPON_DAMAGE_MODIFIER

Old name: _SET_PED_DAMAGE_MODIFIER

Hash0xD77AE48611B7B10A
Runtime nameSetPedToPlayerWeaponDamageModifier
NamespacePED
SideClient
NameOfficial
Docs
Since build1207

Signature

void SET_PED_TO_PLAYER_WEAPON_DAMAGE_MODIFIER(Ped ped, float damageModifier);

Parameters

NameTypeDescription
pedPed—
damageModifierfloat—

Returns void

Description

Old name: _SET_PED_DAMAGE_MODIFIER

Usage

Lua
SetPedToPlayerWeaponDamageModifier(ped, damageModifier)

-- always works, by hash
Citizen.InvokeNative(0xD77AE48611B7B10A, ped, damageModifier)
JavaScript and C#
JavaScript
SetPedToPlayerWeaponDamageModifier(ped, damageModifier);

// by hash
Citizen.invokeNative('0xD77AE48611B7B10A', ped, damageModifier + 0.0000001);
C#
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. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

See also

Sources

alloc8or RDR3 NativeDB

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