Solved Online Admins

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

Buzdrev

Member
Feb 25, 2017
23
0
0
26
I need some skript that will display online admins in the server. I searched in the net but found nothing.
I want when you type /admins to show you something like this:
Admins: Nick, Nick
Moderators: Nick, Nick
and if there are no moderators online to show only:
Admins: Nick, nick
 
I need some skript that will display online admins in the server. I searched in the net but found nothing.
I want when you type /admins to show you something like this:
Admins: Nick, Nick
Moderators: Nick, Nick
and if there are no moderators online to show only:
Admins: Nick, nick
Can you rephrase your post? This doesn't make a lot of sense.
 
Can you rephrase your post? This doesn't make a lot of sense.
I think he means this:
If there are admins online, it will display
Admins: Player1, Player2, Player3

And if there are moderators online, it will display
Moderators: Player1, Player2, Player3

If no moderators are online, then the moderator list will not show up when you type the command.
 
I think he means this:
If there are admins online, it will display
Admins: Player1, Player2, Player3

And if there are moderators online, it will display
Moderators: Player1, Player2, Player3

If no moderators are online, then the moderator list will not show up when you type the command.

That's exactly what I want.
[doublepost=1496732255,1496693709][/doublepost]It can be done with looping all players and check if they have some permission but I don't know how to display admins names and I don't know how to hide admin list if there are no admins online.
 
That's exactly what I want.
[doublepost=1496732255,1496693709][/doublepost]It can be done with looping all players and check if they have some permission but I don't know how to display admins names and I don't know how to hide admin list if there are no admins online.

code_language.skript:
command /list:
    trigger:
        loop all players:
            if loop-player has permission "Admin":
                add loop-player to {_a::*}
            else if loop-player has permission "Mod":
                 add loop-player to {_m::*}
        if {_a::*} is set:
            send "&aAdmin&8: &r%{_a::*}%"
        if {_m::*} is set:
            send "&bMod&8: &r%{_m::*}%"