RedM Natives

NETWORK_GET_FIRST_ENTITY_OWNER

Returns the first owner ID of the specified entity.

Hash0x1E546224
Runtime nameNetworkGetFirstEntityOwner
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

int NETWORK_GET_FIRST_ENTITY_OWNER(Entity entity);

Parameters

NameTypeDescription
entityEntity

The entity to get the first owner for.

Returns int — The server ID of the first entity owner.

Description

Cfx.re native reference

Returns the first owner ID of the specified entity.

Usage

Lua
local retval = NetworkGetFirstEntityOwner(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0x1e546224, entity, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = NetworkGetFirstEntityOwner(entity);

// by hash
const retval = Citizen.invokeNative('0x1e546224', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x1e546224, entity);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.