# ENTITY::_GET_ENTITY_SCRIPT

- **Hash:** `0x2A08A32B6D49906F`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `GetEntityScript`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/_GET_ENTITY_SCRIPT

## Signature

```c
Hash _GET_ENTITY_SCRIPT(Entity entity, Any* argStruct);
```

## Parameters

- `entity` (`Entity`)
- `argStruct` (`Any*`)

## Returns

`Hash`

## Usage

### Lua

```lua
local retval, argStruct = GetEntityScript(entity, argStruct)

-- always available, by hash
local retval, argStruct = Citizen.InvokeNative(0x2A08A32B6D49906F, entity, Citizen.PointerValueIntInitialized(argStruct), Citizen.ResultAsInteger())
```

### JavaScript

```js
const [retval, argStruct] = GetEntityScript(entity, argStruct);

// by hash
const [retval, argStruct] = Citizen.invokeNative('0x2A08A32B6D49906F', entity, Citizen.pointerValueIntInitialized(argStruct), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
var argStruct = new OutputArgument();
int retval = Function.Call<int>((Hash)0x2A08A32B6D49906F, entity, argStruct);
// argStruct.GetResult<int>()
```

- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- `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.

*Sources: alloc8or RDR3 NativeDB.*
