how to skip a arg???

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

loprip147

Member
Mar 18, 2017
3
0
1
if my new command is
command /nametag [<text>] [<player>] [<text>]:

how to skip player-arg-1 and just go to text-arg-2

example: /nametag find <player>
/nametag add <text>
 
code_language.skript:
if arg 2 is not set:
    arg 3 is set:
That's not what he meant, he meant to use an arg for multiple things.
Use [<string>] like this
code_language.skript:
command /nametag [<text>] [<string>] [<text>]:
    trigger:
        if arg-1 is "find":
            set {_arg-2} to arg-2 parsed as offlineplayer
            # your code with {_arg-2} being 'arg-2'
        else if arg-1 is "add":
            # your code with just arg-2 '
With string however, you need to parse it as something (player, etc.) to make it fully work. This above is just an example
 
Last edited:
That's not what he meant, he meant to use an arg for multiple things.
Use [<string>] like this
code_language.skript:
command /nametag [<text>] [<string>] [<text>]:
    trigger:
        if arg-1 is "find":
            set {_arg-2} to arg-2 parsed as offlineplayer
            # your code with {_arg-2} being 'arg-2'
        else if arg-1 is "add":
            set {_arg-2} to arg-2 parsed as text
            # your code with {_arg-2} being 'arg-2'
With string however, you need to parse it as something (text, player, etc.) to make it fully work. This above is just an example

(BTW if you want colored nametags *i believe that's what your code is for* use ' colored arg-2 parsed as text ' instead of just ' arg-2 parsed as text '
text and strings are the same thing
 
  • Like
Reactions: Mr_Simba
my target is
when i arg-1 is "find"

so i writing arg-2 i can find player's name when i clicking tab
:emoji_eyes::emoji_eyes:
 
Status
Not open for further replies.