# MISC::CREATE_INCIDENT

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

## Signature

```c
BOOL CREATE_INCIDENT(int dispatchService, float x, float y, float z, int numUnits, float radius, int* outIncidentID, Any p7, Any p8);
```

## Parameters

- `dispatchService` (`int`)
- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `numUnits` (`int`)
- `radius` (`float`)
- `outIncidentID` (`int*`)
- `p7` (`Any`)
- `p8` (`Any`)

## Returns

`BOOL`

## Description

dispatchService: see ENABLE_DISPATCH_SERVICE

## Usage

### Lua

```lua
local retval, outIncidentID = CreateIncident(dispatchService, x, y, z, numUnits, radius, p7, p8)

-- always available, by hash
local retval, outIncidentID = Citizen.InvokeNative(0x3F892CAF67444AE7, dispatchService, x, y, z, numUnits, radius, Citizen.PointerValueInt(), p7, p8, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, outIncidentID] = CreateIncident(dispatchService, x, y, z, numUnits, radius, p7, p8);

// by hash
const [retval, outIncidentID] = Citizen.invokeNative('0x3F892CAF67444AE7', dispatchService, x + 0.0000001, y + 0.0000001, z + 0.0000001, numUnits, radius + 0.0000001, Citizen.pointerValueInt(), p7, p8, Citizen.returnResultAnyway());
```

### C#

```csharp
var outIncidentID = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x3F892CAF67444AE7, dispatchService, x, y, z, numUnits, radius, outIncidentID, p7, p8);
// outIncidentID.GetResult<int>()
```

- 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.
- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

*Sources: alloc8or RDR3 NativeDB.*
