/staff - See if a staff is online

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

Kampfwombat

Member
Apr 21, 2017
14
0
0
21
Hello, I want a skript which shows you which players from the staff team are online and which aren't.
The command should be /staff.
Every player with the permission "cmd.staff" should be listed there.
If the player is offline his name should be grey (&7) and if he's online it should be green. (&a)

I hope someone can help me :emoji_slight_smile:
 
Last edited:
I'm not sure if you can check permissions of offline players, so I don't know if there's any way to show the offline ones without you storing them in a list yourself. However, showing the online ones is very simple:

code_language.skript:
command /staff:
    trigger:
        loop players:
            loop-player has permission "cmd.staff"
            add loop-player to {_onlineStaff::*}
        send "&2Online Staff:&a %{_onlineStaff::*}%" to the command sender
 
I'm not sure if you can check permissions of offline players, so I don't know if there's any way to show the offline ones
TuSKe + Skellett:
code_language.skript:
loop offline players:
    add 1 to {_counter}
    if player data of loop-offlineplayer has permission "cmd.staff":
        add loop-offlineplayer to {_offlineStaff::*}
    if mod({_counter}, 40) is 0:
        wait 1 tick
 
Status
Not open for further replies.