Solved tab completer

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

Josh Clarke

New Member
Aug 14, 2020
7
0
1
23
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%}
 
Just create new file "completer.sk" with this code:
Code:
on tab completer for "/et":
    if argument at 2 is not set:
        set {_completers::*} to "give", "take", "set" and "reset"
        loop {_completers::*}:
            add loop-value to completions
        else:
            stop

skript with completer need load last
 
  • Like
Reactions: Josh Clarke
Status
Not open for further replies.