# CFX::GET_ENTITY_SCRIPT

- **Hash:** `0xB7F70784`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetEntityScript`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** named only
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_ENTITY_SCRIPT

## Signature

```c
char* GET_ENTITY_SCRIPT(Entity entity);
```

## Parameters

- `entity` (`Entity`)

## Returns

`char*`

## Usage

### Lua

```lua
local retval = GetEntityScript(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0xb7f70784, entity, Citizen.ResultAsString())
```

### JavaScript

```js
const retval = GetEntityScript(entity);

// by hash
const retval = Citizen.invokeNative('0xb7f70784', entity, Citizen.returnResultAnyway(), Citizen.resultAsString());
```

### C#

```csharp
string retval = Function.Call<string>((Hash)0xb7f70784, entity);
```

*Sources: Cfx.re native reference.*
