# MISC::_CREATE_AI_MEMORY

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

## Signature

```c
void _CREATE_AI_MEMORY(Any* args, int aiMemoryType);
```

## Parameters

- `args` (`Any*`)
- `aiMemoryType` (`int`)

## Returns

`void`

## Description

aiMemoryType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/_CREATE_AI_MEMORY

## Usage

### Lua

```lua
local args = CreateAiMemory(aiMemoryType)

-- always available, by hash
local args = Citizen.InvokeNative(0x88BC5F4AEF77FC4E, Citizen.PointerValueInt(), aiMemoryType)
```

### JavaScript

```js
const args = CreateAiMemory(aiMemoryType);

// by hash
const args = Citizen.invokeNative('0x88BC5F4AEF77FC4E', Citizen.pointerValueInt(), aiMemoryType);
```

### C#

```csharp
var args = new OutputArgument();
Function.Call((Hash)0x88BC5F4AEF77FC4E, args, aiMemoryType);
// args.GetResult<int>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.
- 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.

## Related enums

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

*Sources: alloc8or RDR3 NativeDB.*
