# PED::SET_COMBAT_FLOAT

- **Hash:** `0xFF41B4B141ED981C`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `SetCombatFloat`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PED/SET_COMBAT_FLOAT

## Signature

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

## Parameters

- `ped` (`Ped`)
- `combatType` (`int`)
- `newValue` (`float`)

## Returns

`void`

## Description

*Source: 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

*Source: 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

```lua
SetCombatFloat(ped, combatType, newValue)

-- always available, by hash
Citizen.InvokeNative(0xFF41B4B141ED981C, ped, combatType, newValue)
```

### JavaScript

```js
SetCombatFloat(ped, combatType, newValue);

// by hash
Citizen.invokeNative('0xFF41B4B141ED981C', ped, combatType, newValue + 0.0000001);
```

### C#

```csharp
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.

## Related enums

- [eCombatAttributeFloats](https://natives.borderlinerp.com/enums/eCombatAttributeFloats.md) — 72 values

## See also

- [PED::GET_COMBAT_FLOAT](https://natives.borderlinerp.com/natives/PED/GET_COMBAT_FLOAT.md)

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
