1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved tab completer

Discussion in 'Skript' started by Josh Clarke, Sep 19, 2020.

Thread Status:
Not open for further replies.
  1. Josh Clarke

    Josh Clarke New Member

    Joined:
    Aug 14, 2020
    Messages:
    7
    Likes Received:
    0
    I am trying to make a tab completer using skqurey and i have done it but now it does it for both arguments when i only want it to do it for the first one is there away to fix this?

    on tab completer for "/et":
    set {_completers::*} to "give", "take", "set" and "reset"
    loop {_completers::*}:
    add loop-value to completions

    command /et <string> <number>:
    permission: "op"
    trigger:
    if arg-1 is "give":
    add arg-2 to {token.%player%}
    if arg-1 is "take":
    remove arg-2 from {token.%player%}
    if arg-1 is "set":
    set {token.%player%} to arg-2
    if arg-1 is "reset":
    reset {token.%player%}
     
  2. Best Answer:
    Post #2 by Linegrite, Sep 29, 2020
  3. Linegrite

    Linegrite Member

    Joined:
    May 22, 2020
    Messages:
    17
    Likes Received:
    3
    Just create new file "completer.sk" with this code:
    Code (Text):
    1. on tab completer for "/et":
    2.     if argument at 2 is not set:
    3.         set {_completers::*} to "give", "take", "set" and "reset"
    4.         loop {_completers::*}:
    5.             add loop-value to completions
    6.         else:
    7.             stop
    skript with completer need load last
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...