RedM Natives

SET_COMBAT_FLOAT

combatType can be between 0-14.

Hash0xFF41B4B141ED981C
Runtime nameSetCombatFloat
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xFF41B4B141ED981C

Signature

void SET_COMBAT_FLOAT(Ped ped, int combatType, float newValue);

Parameters

NameTypeDescription
pedPed—
combatTypeint—
newValuefloat—

Returns void

Description

alloc8or RDR3 NativeDB

combatType: https://github.com/femga/rdr3_discoveries/tree/master/AI/COMBAT_FLOATS
https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eCombatAttributeFloats

VORPCORE RDR3natives

combatType can be between 0-14. See GET_COMBAT_FLOAT below for a list of possible parameters.
https://github.com/femga/rdr3_discoveries/tree/master/AI/COMBAT_FLOATS
https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eCombatAttributeFloats

Usage

Lua
SetCombatFloat(ped, combatType, newValue)

-- always works, by hash
Citizen.InvokeNative(0xFF41B4B141ED981C, ped, combatType, newValue)
JavaScript and C#
JavaScript
SetCombatFloat(ped, combatType, newValue);

// by hash
Citizen.invokeNative('0xFF41B4B141ED981C', ped, combatType, newValue + 0.0000001);
C#
Function.Call((Hash)0xFF41B4B141ED981C, ped, combatType, newValue);
  • 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.

Enums and flags

See also

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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