Command Tab Complete (pls Help)

  • 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.
Mar 1, 2017
109
1
18
Hey, would like to edit every command on my Server (Tab)

Code:

code_language.skript:
on command tab complete:
    if {Modus.FreeBuild.%sender%} is true:
        if "%last token%" is not "":
            set {_l} to length of last token
            loop all players:
                {Modus.FreeBuild.%loop-player%} is true
                if {chatnick1.%loop-player%} is true:
                    remove "%loop-player%" from completions
                    set {_Player} to {ffanick.%loop-player%}
                else:
                    remove "%loop-player%" from completions
                    set {_Player} to "%loop-player%"
                set {_p} to {_l} first characters of "%{_Player}%"
                if "%{_p}%" is "%last token%":
                    remove "%{_Player}%" from completions
                    add "%{_Player}%" to completions
 
Hi, it's seems that you are new in skript, there'r some missing things that are basic (I recomend you start with basic ideas, and easier codes)
Now, are you trying to modify the command? like /tab -> /tabcomplete ?.
This should work (Not tested)
Hope you find a solution!
code_language.skript:
on command /tabcomplete:
    trigger:
        if {Modus.FreeBuild.%sender%} is true:
            if "%last token%" is not "":
                set {_l} to length of last token
                loop all players:
                    {Modus.FreeBuild.%loop-player%} is true
                    if {chatnick1.%loop-player%} is true:
                        remove "%loop-player%" from completions
                        set {_Player} to {ffanick.%loop-player%}
                    else:
                        remove "%loop-player%" from completions
                        set {_Player} to "%loop-player%"
                        set {_p} to {_l} first characters of "%{_Player}%"
                        if "%{_p}%" is "%last token%":
                        remove "%{_Player}%" from completions
                        add "%{_Player}%" to completions
 
Hi, it's seems that you are new in skript, there'r some missing things that are basic (I recomend you start with basic ideas, and easier codes)
Now, are you trying to modify the command? like /tab -> /tabcomplete ?.
This should work (Not tested)
Hope you find a solution!
code_language.skript:
on command /tabcomplete:
    trigger:
        if {Modus.FreeBuild.%sender%} is true:
            if "%last token%" is not "":
                set {_l} to length of last token
                loop all players:
                    {Modus.FreeBuild.%loop-player%} is true
                    if {chatnick1.%loop-player%} is true:
                        remove "%loop-player%" from completions
                        set {_Player} to {ffanick.%loop-player%}
                    else:
                        remove "%loop-player%" from completions
                        set {_Player} to "%loop-player%"
                        set {_p} to {_l} first characters of "%{_Player}%"
                        if "%{_p}%" is "%last token%":
                        remove "%{_Player}%" from completions
                        add "%{_Player}%" to completions


It does not work :emoji_frowning:
 
It does not work :emoji_frowning:
errors? version of skript and minecraft? i need info.
try this:
code_language.skript:
command /tabcomplete:
    trigger:
        if {Modus.FreeBuild.%sender%} is true:
            if "%last token%" is not "":
                set {_l} to length of last token
                loop all players:
                    {Modus.FreeBuild.%loop-player%} is true
                    if {chatnick1.%loop-player%} is true:
                        remove "%loop-player%" from completions
                        set {_Player} to {ffanick.%loop-player%}
                    else:
                        remove "%loop-player%" from completions
                        set {_Player} to "%loop-player%"
                        set {_p} to {_l} first characters of "%{_Player}%"
                        if "%{_p}%" is "%last token%":
                        remove "%{_Player}%" from completions
                        add "%{_Player}%" to completions
 
@krainser seems to not have that much experience in Skript.
Calling Events don't require "trigger" and your second proposal is only for one command.
@Auswahluhr6004 , do you have any errors?
Yes,
Errors:
code_language.skript:
can't understand this event: 'on command tab complete'
[doublepost=1491245607,1491164569][/doublepost]
Yes,
Errors:
code_language.skript:
can't understand this event: 'on command tab complete'
I can't make any screens
 
Status
Not open for further replies.