Color names and prefix

  • 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.
Feb 24, 2017
191
7
0
23
foroendertheth.foroactivo.com
So I make a tag skript and Im having this problem when I set a tag for me work for the tablist but no for the chat and I dont wanna use on chat. How I fix this
code:
Code:
on join:
    if {tag::%player%} is set:
        set display name of the player to coloured "{@[}[{@in}%{tag::tag.%player%}%{@]}]{@nc}%name of player%"
        set the player's tablist name to "%{tag::tag.%player%}%"
command /tag [<text>] [<player>]:
    aliases: /tags
    trigger:
        if player has permission "tag.use":
            if arg 1 is set:
                if length of arg-1 <= 4:
                    if arg 2 is set:
                        if player has permission "tag.other":
                            if arg 2 is "%player%":
                                set {tag::%player%} to true
                                set {tag::tag.%player%} to "{@[}[{@in}%arg 1%{@]}]{@nc}%player%"
                                set the player's display name to "{@[}[{@in}%arg 1%{@]}]{@nc}%player%"
                                set the player's tablist name to "{@[}[{@in}%arg 1%{@]}]{@nc}%player%"
                                message "{@logo}You changed your tag to ""{@[}[{@in}%arg 1%{@]}]"""
                            else:
                                set the arg 2's display name to "{@[}[{@in}%arg 1%{@]}]{@nc}%arg 2%"
                                set {tag::%arg 2%} to true
                                set {tag::tag.%arg 2%} to "{@[}[{@in}%arg 1%{@]}]{@nc}%arg 2%"
                                set the arg 2's tablist name to "{@[}[{@in}%arg 1%{@]}]{@nc}%arg 2%"
                                message "{@logo}You changed arg 2 tag to ""{@[}[{@in}%arg 1%{@]}]""" to player
                                message "{@logo}%player% changed your tag to ""{@[}[{@in}%arg 1%{@]}]""" to arg 2
                        else:
                            message "{@logo}You need ""tag.other"" to execute this command"
                    else:
                        if player has permission "tag.tag":
                            set the player's display name to "{@[}[{@in}%arg 1%{@]}]{@nc}%player%"
                            set {tag::tag.%player%} to "{@[}[{@in}%arg 1%{@]}]{@nc}%player%"
                            set {tag::%player%} to true
                            set the player's tablist name to "{@[}[{@in}%arg 1%{@]}]{@nc}%player%"
                            message "{@logo}You changed your tag to ""{@[}[{@in}%arg 1%{@]}]"""
                        else:
                            message "{@logo}You need permission ""tag.tag"" to execute this command"
                else:
                    message "{@logo}The maximun tag characters is 4"
            else if player has permission "tag.other":
                message "{@logo}/tag <tag> ::Change your own tag"
                message "{@logo}/deltag ::Delete your own tag"
                message "{@logo}/tag <tag> <player> ::Change others player's tag"
                message "{@logo}/deltag <player> :: Delete other players tag"
            else:
                message "{@logo}/tag <tag> ::Change your own tag"
        else:
            message "Unknown command. Type ""/help"" for help."
 
Well if display name of player doesn't change their chat name, you will have to use on chat. You probably don't want to cancel it (I think that's what you meant), so you should use chat format. Example: `set chat format to "%display name of player%: <message>"`
 
Status
Not open for further replies.