Need help with /toggleplayervisibility (practice)

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Raverb0ne

Member
Jan 16, 2021
2
0
1
25
I was inspired by minemen.club (practice server), they have "/toggleplayervisibility" to show players with the rank raver and above. I'm trying to make the same thing myself but I don't know how.
Im not really good at looping players, and i want everyone to be hidden on join. I have following plugins: Skript, skQuery, skrayfall.

Code:
on join:
loop all players:
hide loop-player to all players

command /toggleplayervisibility:
Aliases: tpv
Permission: {@practice_reveal}
Permission Message: &cYou must be &e&oEpic &cor above to do this.
Trigger:
loop all players:
if loop-player does not have permission "{@practice_reveal}":
hide loop-player to player
if loop-player has permission "{@practice_reveal}":
set {tpv.%player%} to true
reveal loop-player to loop-player
send "&aYou are now showing all &e&oEpic &aranks and above." to player
else:
set {tpv.%player%} to true
hide loop-player to loop-player
send "&cYou are no longer showing &e&oEpic &cranks and above." to player



idk what to do.
 
I was inspired by minemen.club (practice server), they have "/toggleplayervisibility" to show players with the rank raver and above. I'm trying to make the same thing myself but I don't know how.
Im not really good at looping players, and i want everyone to be hidden on join. I have following plugins: Skript, skQuery, skrayfall.

Code:
on join:
loop all players:
hide loop-player to all players

command /toggleplayervisibility:
Aliases: tpv
Permission: {@practice_reveal}
Permission Message: &cYou must be &e&oEpic &cor above to do this.
Trigger:
loop all players:
if loop-player does not have permission "{@practice_reveal}":
hide loop-player to player
if loop-player has permission "{@practice_reveal}":
set {tpv.%player%} to true
reveal loop-player to loop-player
send "&aYou are now showing all &e&oEpic &aranks and above." to player
else:
set {tpv.%player%} to true
hide loop-player to loop-player
send "&cYou are no longer showing &e&oEpic &cranks and above." to player



idk what to do.
Code:
on join:
  loop all players:
    hide loop-player to all players
first what does else stand for.
its not even under an "if"
ok it's really annoying when people do it, so i politely ask u to click that plus and then click code.


i understand nothing from the code so just explain what uwanted/
 
Status
Not open for further replies.