I'm trying to create a command that will toggle the scoreboard for that certain player. One player might want to play with it on while another might want it off. This gives them that option. I have gotten the enable and disable part of the code to work, but I'm not sure how I can fit it in with my scoreboard loop. Thanks in advance.
Code:
variables:
{show_info.%player%} = false
every second:
loop all players:
if is in "world":
if {show_info.%player%} is true:
wipe loop-player's sidebar
set name of sidebar of loop-player to "&8&l┃●&d&lWelcome&1&8&l●┃"
set score "&5&l" in sidebar of loop-player to 5
set score "&3» &7&lNAME &a%loop-player%" in sidebar of loop-player to 4
set score "&3» &7&lONLINE &c%number of all players%" in sidebar of loop-player to 3
set score "&5&l" in sidebar of loop-player to 2
set score "&b&lMCHS.mcpro.io" in sidebar of loop-player to 1
command /toggleinfo:
trigger:
send "Triggered" to player
if {show_info.%player%} is false:
set {show_info.%player%} to true
send "True" to player
else:
set {show_info.%player%} to false
send "False" to player