EntityClient

isEntityOnScreen

IS_ENTITY_ON_SCREEN0xE659E47AF827484B

The GTA V native IS_ENTITY_ON_SCREEN of the ENTITY namespace, as LS:MP client scripts call it: the global function isEntityOnScreen, in JavaScript and in Lua.

SignatureJavaScript
isEntityOnScreen(entity: Entity): boolean
SignatureLua
isEntityOnScreen(entity: Entity): boolean

Usage

JavaScript
const result = isEntityOnScreen(entity);
Lua
local result = isEntityOnScreen(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

Returns true if the entity is in between the minimum and maximum values for the 2d screen coords.
This means that it will return true even if the entity is behind a wall for example, as long as you're looking at their location.
Chipping

Reference

Namespace
Entity ENTITY
In the game
BOOL IS_ENTITY_ON_SCREEN(Entity entity)
Hash
0xE659E47AF827484B

Open in the interactive natives reference