# PLAYER::_SET_AI_PLAYER_DEFENSE_MODIFIER_AGAINST_AI

- **Hash:** `0x914071FF93AF2692`
- **Namespace:** PLAYER
- **Runtime name (Lua/JS):** `SetAiPlayerDefenseModifierAgainstAi`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PLAYER/_SET_AI_PLAYER_DEFENSE_MODIFIER_AGAINST_AI

## Signature

```c
void _SET_AI_PLAYER_DEFENSE_MODIFIER_AGAINST_AI(Player player, float modifier);
```

## Parameters

- `player` (`Player`)
- `modifier` (`float`)

## Returns

`void`

## Description

Sets Player's Defense against AI modifier

## Usage

### Lua

```lua
SetAiPlayerDefenseModifierAgainstAi(player, modifier)

-- always available, by hash
Citizen.InvokeNative(0x914071FF93AF2692, player, modifier)
```

### JavaScript

```js
SetAiPlayerDefenseModifierAgainstAi(player, modifier);

// by hash
Citizen.invokeNative('0x914071FF93AF2692', player, modifier + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0x914071FF93AF2692, player, modifier);
```

- 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.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

## See also

- [PLAYER::_GET_AI_PLAYER_DEFENSE_MODIFIER_AGAINST_AI](https://natives.borderlinerp.com/natives/PLAYER/_GET_AI_PLAYER_DEFENSE_MODIFIER_AGAINST_AI.md)

*Sources: alloc8or RDR3 NativeDB.*
