Solved Multiple sub commands

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

Lorderpy

New Member
Apr 8, 2017
5
0
0
Hi,

I'm kinda new to skript, so I have a (probably) nooby question:

How do I add multiple sub commands?
Such as
/game start
/game kit
/game end
etc without it saying that the command already exists.
 
code_language.skript:
command /game [<text>]:
    trigger:
        arg 1 is "start":
            # start command
        
        arg 1 is "kit":
            # kit command
            
        arg 1 is "end":
            # end command

Just define one command and use arguments.
 
code_language.skript:
command /game [<text>]:
    trigger:
        arg 1 is "start":
            # start command
       
        arg 1 is "kit":
            # kit command
           
        arg 1 is "end":
            # end command

Just define one command and use arguments.
How do i use it with /game start Skywars for example (2 args)?
 
code_language.skript:
command /game [<text>] [<text>]:
    trigger:
        arg 1 is "start":
            arg 2 is "skywars":
                # start command
      
        arg 1 is "kit":
            # kit command
          
        arg 1 is "end":
            # end command
 
Status
Not open for further replies.