Signature
native is_visible(entity, target);
Description
Returns if an entity is visible to another entity. Derived from SDK.
Notes
-
If the target entity has the FL_NOTARGET flag set, this native always
returns 0.
-
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.
Parameters
- entity — Entity index
- target — Target entity index
Returns
1 if entity is visible, 0 otherwise
Errors
-
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.