RedM Natives

OBJ_TO_NET

Returns the network ID of the given object.

Hash0x99BFDC94A603E541
Runtime nameObjToNet
NamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x99BFDC94A603E541

Signature

int OBJ_TO_NET(Object object);

Parameters

NameTypeDescription
objectObject—

Returns int

Description

Returns the network ID of the given object.

Usage

Lua
local retval = ObjToNet(object)

-- always works, by hash
local retval = Citizen.InvokeNative(0x99BFDC94A603E541, object, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = ObjToNet(object);

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

See also

Sources

alloc8or RDR3 NativeDB

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