Skip to content

IsPlayerVisibleTo

Whether one player sees another.

IsPlayerVisibleTo(pid, viewer)
Parameter Type
pid number the player who may be hidden
viewer number the player looking

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

if not IsPlayerVisibleTo(pid, target) then SendClientMessage(target, COLOR_GOLD, "You hear nothing.") end

SetPlayerInvisible · SetPlayerInvisibleFor · IsPlayerInvisible · the Players group of the index