Solved Tag skript. How to set maximum tag to 4 characters.

  • 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.
Feb 24, 2017
191
7
0
foroendertheth.foroactivo.com
Code:
on chat:
    cancel event
    if {tag::%player%} is set:
        broadcast "%{tag::%player%}%&a%player%>&b%message%"
    else:
        broadcast "&a%player%>&b%message%"
command /tag [<text>] [<player>]:
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                set {tag::%arg 2%} to "&9[&e%arg 1%&9]"
                if arg 2 is "%player%":
                    message "&6Te cambiaste el tag a ""%{tag::%player%}%"""
                else:
                    message "&6Le cambiaste el tag a %arg 2% a ""%{tag::%arg 2%}%"""
                    message "&6%player% Te cambio el tag a ""%{tag::%arg 2%}%""" to arg 2
            else:
                set {tag::%player%} to "&9[&e%arg 1%&9]"
                message "&6Te cambiaste el tag a ""%{tag::%player%}%"""
        else:
            message "&9/tag <tag> :: Te cambia el tag"
            message "&9/Tag <tag> <jugador> :: Le cambias el tag a un jugador"
            message "&9/Deltag :: Borra tu tag"
            message "&9/Deltag <jugador> :: Borra el tag de el jugador"

command /deltag [<player>]:
    trigger:
        if arg 1 is set:
            delete {tag::%arg 1%}
            if arg 1 is "player":
                message "&6Borraste tu tag"
            else:
                message "&6Borraste el tag de %arg 1%"
                message "&6%player% Borro tu tag" to arg 1
        else:
            delete {tag::%player%}
            message "&6Borraste tu tag"

No console errors, how I set a maximum of 4 characters, thanks
 
do something like `if length of arg-2 <= 4:" then allow the tag `else:` send them a message saying it needs to be 4 or less
 
Status
Not open for further replies.