# CFX::NETWORK_GET_ENTITY_FROM_NETWORK_ID

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

## Signature

```c
Entity NETWORK_GET_ENTITY_FROM_NETWORK_ID(int netId);
```

## Parameters

- `netId` (`int`)

## Returns

`Entity`

## Usage

### Lua

```lua
local retval = NetworkGetEntityFromNetworkId(netId)

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

### JavaScript

```js
const retval = NetworkGetEntityFromNetworkId(netId);

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

### C#

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

*Sources: Cfx.re native reference.*
