Discord Thread Nametag not shown through blocks error

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
code_language.skript:
options:
  name tag visibility: true  # Enable nametag hiding feature

on load:
  if name tag visibility is true:
    loop all players:
      set {_hiddenPlayers::%uuid of loop-player%} to {}

on join:
  if name tag visibility is true:
    loop all players:
      hide loop-player's nametag from all players
      make loop-player's nametag visible to {_hiddenPlayers::%uuid of loop-player%}

on quit:
  if name tag visibility is true:
    remove player from {_hiddenPlayers::%uuid of player%}

on every tick:
  if name tag visibility is true:
    loop all players:
      if player is not loop-player and player can see loop-player:
        if {_hiddenPlayers::%uuid of loop-player%} contains player:
          make loop-player's nametag visible to player
          remove player from {_hiddenPlayers::%uuid of loop-player%}
      else:
        if {_hiddenPlayers::%uuid of loop-player%} does not contain player:
          hide loop-player's nametag from player
          add player to {_hiddenPlayers::%uuid of loop-player%}

Posted by: csulaaa from the skUnity Discord.
 
Status
Not open for further replies.