# EVENT::ADD_SHOCKING_EVENT_AT_POSITION

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

## Signature

```c
ScrHandle ADD_SHOCKING_EVENT_AT_POSITION(Hash eventType, float x, float y, float z, float p4, float p5, float p6, float p7, float p8, int p9, int p10);
```

## Parameters

- `eventType` (`Hash`)
- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `p4` (`float`)
- `p5` (`float`)
- `p6` (`float`)
- `p7` (`float`)
- `p8` (`float`)
- `p9` (`int`)
- `p10` (`int`)

## Returns

`ScrHandle`

## Description

eventType: https://alloc8or.re/rdr3/doc/enums/eEventType.txt
https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS

## Usage

### Lua

```lua
local retval = AddShockingEventAtPosition(eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10)

-- always available, by hash
local retval = Citizen.InvokeNative(0xD9F8455409B525E9, eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = AddShockingEventAtPosition(eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10);

// by hash
const retval = Citizen.invokeNative('0xD9F8455409B525E9', eventType, x + 0.0000001, y + 0.0000001, z + 0.0000001, p4 + 0.0000001, p5 + 0.0000001, p6 + 0.0000001, p7 + 0.0000001, p8 + 0.0000001, p9, p10, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xD9F8455409B525E9, eventType, x, y, z, p4, p5, p6, p7, p8, p9, p10);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.
- 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

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

*Sources: alloc8or RDR3 NativeDB.*
