# CFX::NETWORK_GET_ENTITY_OWNER

- **Hash:** `0x526FEE31`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `NetworkGetEntityOwner`
- **Side:** shared (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/NETWORK_GET_ENTITY_OWNER

## Signature

```c
int NETWORK_GET_ENTITY_OWNER(Entity entity);
```

## Parameters

- `entity` (`Entity`) — The entity to get the owner for.

## Returns

`int` — On the server, the server ID of the entity owner. On the client, returns the player/slot ID of the entity owner.

## Description

*Source: Cfx.re native reference*

Returns the owner ID of the specified entity.

## Usage

### Lua

```lua
local retval = NetworkGetEntityOwner(entity)

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

### JavaScript

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

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

### C#

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

*Sources: Cfx.re native reference.*
