IsPlayerVisibleTo
Whether one player sees another.
Syntax
Section titled “Syntax”IsPlayerVisibleTo(pid, viewer)| Parameter | Type | |
|---|---|---|
pid |
number | the player who may be hidden |
viewer |
number | the player looking |
Returns
Section titled “Returns”boolean - the viewer’s own rule (SetPlayerInvisibleFor) when there is one, else not IsPlayerInvisible(pid); always true for a player looking at themselves, false when either is not connected
Example
Section titled “Example”if not IsPlayerVisibleTo(pid, target) then SendClientMessage(target, COLOR_GOLD, "You hear nothing.") endSee also
Section titled “See also”SetPlayerInvisible · SetPlayerInvisibleFor · IsPlayerInvisible · the Players group of the index
