NetworkClient

netToEnt

NET_TO_ENT0xBFFEAB45A9A9094A

The GTA V native NET_TO_ENT of the NETWORK namespace, as LS:MP client scripts call it: the global function netToEnt, in JavaScript and in Lua.

SignatureJavaScript
netToEnt(netHandle: number): Entity
SignatureLua
netToEnt(netHandle: integer): Entity

Usage

JavaScript
const entity = netToEnt(netHandle);
Lua
local entity = netToEnt(netHandle)

Parameters

ParameterTypeJavaScriptLua
netHandleintnumberinteger

Returns

Entity JavaScript number, Lua integer

Game handle of an entity: a ped, a vehicle or an object. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

gets the entity id of a network id

Reference

Namespace
Network NETWORK
In the game
Entity NET_TO_ENT(int netHandle)
Hash
0xBFFEAB45A9A9094A

Open in the interactive natives reference