Tablist Prefixes

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

TheDever

Member
Sep 2, 2023
23
3
3
- Problem
So i made a tablist skript but i got 2 problems.

1# - It only shows to 1 person in the server.
2# - I don't know how to do the prefix on tablist.

Any Help?
Here is my skript!

```every second:
loop all players:
set loop-player's tab list header to "&e%nl%&e&lSPACESSKIES &7(%amount of players% Online)%nl%&b"
set loop-player's tab list footer to "&b%nl%&7Visit our store via &e/store%nl%&7Join our discord via &e/discord%nl%&b%nl%&esᴘᴀᴄᴇssᴋɪᴇs.ᴍɪɴᴇʜᴜᴛ.ɢɢ%nl%&b"
set loop-player's prefix to "%player's prefix%&7 %loop-player%"
stop```

- Information
Just saying, i do not know how to put the
skript in a box. I do not know if it does it automatically
or not so please do not shame me!
 
I personally do not use skript for my tab, I use a lightweight plugin that's much more efficient and simple to use.

However, if you do want to use skript, the code below should work. It might not be the most efficient way. I did not check for errors.

Code:
function tab(p: player):

    set {_p}'s tab list name to "%player's prefix% %player%"
    set all players' tab list header to "Your Server Name"
    set all players' tab list footer to "Server IP"
   
on connect:
    loop all players:
        tab(loop-player)

every 10 seconds:
    loop all players:
        tab(loop-player)

If you want sort your ranks, use this.
 
I personally do not use skript for my tab, I use a lightweight plugin that's much more efficient and simple to use.

However, if you do want to use skript, the code below should work. It might not be the most efficient way. I did not check for errors.

Code:
function tab(p: player):

    set {_p}'s tab list name to "%player's prefix% %player%"
    set all players' tab list header to "Your Server Name"
    set all players' tab list footer to "Server IP"
  
on connect:
    loop all players:
        tab(loop-player)

every 10 seconds:
    loop all players:
        tab(loop-player)

If you want sort your ranks, use this.
Thanks alot!

All i needed was the "set player's tab list name to "%player's prefix% %player%""
I have vault installed so it should work! Thanks!