Another way

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

    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.

MateoxPL

Active Member
Jan 27, 2018
116
0
16
Hello
is there another way to write this script ?
because this lags the server when there are +50 players

Code:
on join:
    wait 1 tick
    make console execute "/set-tablist-nick %player%"
            
command /set-tablist-nick [<offlineplayer>]:
    permission: admin
    permission message: Error
    trigger:
        if arg 1 has the permission "perm7":
            set arg 1's tablist name to "&cOwner [&e%{lv::%arg 1%}%&8]&c %arg 1%"
            set arg 1's tag to "&cOwner "
            stop
        else if arg 1 has the permission "perm6":
            set arg 1's tablist name to "&2Admin [&e%{lv::%arg 1%}%&8]&2 %arg 1%"
            set arg 1's tag to "&2Admin "
            stop
        else if arg 1 has the permission "perm5":
            set arg 1's tablist name to "&aMod [&e%{lv::%arg 1%}%&8]&a %arg 1%"
            set arg 1's tag to "&aMod "
            stop
        else if arg 1 has the permission "perm4":
            set arg 1's tablist name to "&6Helper [&e%{lv::%arg 1%}%&8]&6 %arg 1%"
            set arg 1's tag to "&6Helper "
            stop
        else if arg 1 has the permission "perm3":
            set arg 1's tablist name to "&dSVIP [&e%{lv::%arg 1%}%&8]&f %arg 1%"
            set arg 1's tag to "&dSVIP "
            stop
        else if arg 1 has the permission "perm2":
            set arg 1's tablist name to "&8VIP [&e%{lv::%arg 1%}%&8]&3 %arg 1%"
            set arg 1's tag to "&8VIP "
            stop
        else if arg 1 has the permission "perm1":
            set arg 1's tablist name to "&7Player [&e%{lv::%arg 1%}%&8]&7 %arg 1%"
            set arg 1's tag to "&7"
            stop
 
code_language.skript:
join:
    player's group = "Owner":
        set player's tablist name to "&cOwner [&e%{lv::%player%}%&8]&c %player%"
        set player's tag to "&cOwner "
    else if player's group = "Admin":
        set player's tablist name to "&cOwner [&e%{lv::%player%}%&8]&2 %player%"
        set player's tag to "&2Admin "
    else if player's group = "Mod":
        set player's tablist name to "&aMod [&e%{lv::%player%}%&8]&a %player%"
        set player's tag to "&aMod "
    else if player's group = "Helper":
        set player's tablist name to "&6Helper [&e%{lv::%player%}%&8]&a %player%"
        set player's tag to "&6Helper "
    else if player's group = "SVIP":
        set player's tablist name to "&dSVIP [&e%{lv::%player%}%&8]&f %player%"
        set player's tag to "&dSVIP "
    else if player's group = "VIP":
        set player's tablist name to "&8VIP [&e%{lv::%player%}%&8]&3 %player%"
        set player's tag to "&8VIP "
    else:
        set player's tablist name to "&7Player [&e%{lv::%player%}%&8]&7 %player%"
        set player's tag to "&7"
 
@Runakai1
that's what I do, but skript can not read the "player's group" becouse I use ultrapermissions plugin for permissions
Tbh, I've never heard of that plugin and suggest using one of the more popular permission plugins, which are suported by Skript.
 
Status
Not open for further replies.