RedM Natives

NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID

Hash0x1E2E3177
Runtime nameNetworkDoesEntityExistWithNetworkId
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

BOOL NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID(int netId);

Parameters

NameTypeDescription
netIdint

The network id to check

Returns BOOL — Returns `true` if both the network id exist, and the network id has a game object.

Usage

Lua
local retval = NetworkDoesEntityExistWithNetworkId(netId)

-- always works, by hash
local retval = Citizen.InvokeNative(0x1e2e3177, netId, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = NetworkDoesEntityExistWithNetworkId(netId);

// by hash
const retval = Citizen.invokeNative('0x1e2e3177', netId, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x1e2e3177, netId);

Sources

Cfx.re native reference

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