# TASK::_ADD_COVER_POINT_FOR_ENTITY

- **Hash:** `0x59872EA4CBD11C56`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `AddCoverPointForEntity`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **Other names:** `_ADD_COVERPOINT_FOR_ENTITY`
- **URL:** https://natives.borderlinerp.com/natives/TASK/_ADD_COVER_POINT_FOR_ENTITY

## Signature

```c
ScrHandle _ADD_COVER_POINT_FOR_ENTITY(Entity entity, float xOffset, float yOffset, float zOffset, float heading, int p5, int p6, int p7, int p8);
```

## Parameters

- `entity` (`Entity`)
- `xOffset` (`float`)
- `yOffset` (`float`)
- `zOffset` (`float`)
- `heading` (`float`)
- `p5` (`int`)
- `p6` (`int`)
- `p7` (`int`)
- `p8` (`int`)

## Returns

`ScrHandle`

## Description

Returns the entity coverpoint with offset.

## Usage

### Lua

```lua
local retval = AddCoverPointForEntity(entity, xOffset, yOffset, zOffset, heading, p5, p6, p7, p8)

-- always available, by hash
local retval = Citizen.InvokeNative(0x59872EA4CBD11C56, entity, xOffset, yOffset, zOffset, heading, p5, p6, p7, p8, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = AddCoverPointForEntity(entity, xOffset, yOffset, zOffset, heading, p5, p6, p7, p8);

// by hash
const retval = Citizen.invokeNative('0x59872EA4CBD11C56', entity, xOffset + 0.0000001, yOffset + 0.0000001, zOffset + 0.0000001, heading + 0.0000001, p5, p6, p7, p8, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x59872EA4CBD11C56, entity, xOffset, yOffset, zOffset, heading, p5, p6, p7, p8);
```

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

*Sources: alloc8or RDR3 NativeDB.*
