native
is_visible
Syntax
native is_visible(entity, target);
Description
Returns if an entity is visible to another entity. Derived from SDK.
Parameters
| entity | Entity index |
|---|---|
| target | Target entity index |
Note
If the target entity has the FL_NOTARGET flag set, this native always
returns 0.
Note
This native fires a traceline between the view-offset origins of the
entities. If the traceline is unobstructed it returns true. This is not
a full 3D visibility check.
Return
1 if entity is visible, 0 otherwise
Error
If an invalid entity index is provided or, if the index is a
client index, the client is not connected, an error will be
thrown.