Tablist Help

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

Mast3rone123

Member
Jul 25, 2021
3
0
1
24
Hi , im making a skirpt for screenshare, and I want when I execute the command /ss [player] it changes the names in the tablist
For example
[Staff] Player
[Frozen] Player

This is my code

command /ss <player>:
trigger:
if {ssspawn} is set:
if argument has permission "staff":
if arg-1 is set:
if {check.%argument%} is false:
set {check.%argument%} to true
make console execute command "{@AfkAddPerm}"
clear player's inventory
clear argument's inventory
teleport player to {controllospawn}
teleport argument to {controllospawn}
set player tab name to "staff %player%"
set argument tab name to "frozen %player%"
 
I used
Code:
set tablist name of arg-1 to "&8| Gamer | &7%player%"
In my scripts. (This is just a reference)

So for you it can be:
Code:
command /ss <player>:
    trigger:
        if {ssspawn} is set:
            if executor has permission "staff":
                if arg-1 is set:
                    if {check.%arg-1%} is false:
                        set {check.%arg-1%} to true
                        make console execute command "{@AfkAddPerm}"
                        clear inventory of executor
                        clear inventory of arg-1
                        teleport executor to {controllospawn}
                        teleport arg-1 to {controllospawn}
                        set tablist name of executor to "&6[Staff] &f%player%"
                        set tablist name of arg-1 to "&c[Frozen] &f%player%"
                        stop
But than again, I can't check if this code fully works or if it uses addons.
 
Last edited:
Status
Not open for further replies.