On Chat Tab Complete

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

How can i make it so:

When i wirte "b" then it searches after names with "b" in the name.

But when i write "b" then comes a name with "a". Why???

Pls. Can you help me
 
Can you maybe show us your code?
Yes, here:

code_language.skript:
on chat tab complete:
    if {Modus.FreeBuild.%sender%} is true:
        loop all players:
            if {Modus.FreeBuild.%loop-player%} is true:
                if {chatnick1.%loop-player%} is not set:
                    remove "%loop-player%" from completions
                    add "%loop-player%" to completions
                else:
                    add "%{ffanick.%loop-player%}%" to completions
                    remove "%loop-player%" from completions
 
I have no idea what you are doing with your code.

Maybe try this out:

code_language.skript:
on chat tab complete:
    if "%last token%" is not "":
        set {_l} to length of last token
        loop all players:
            set {_p} to {_l} first characters of "%loop-player%"
            if "%{_p}%" is "%last token%":
                add "%loop-player%" to completions


EDIT:

Okay, i have read your code again. What i understand. you have set variables. if the player in world "Freebuild" or in Gamemode "Freebuild" or what ever. and if someone nicked.... so maybe try this out

code_language.skript:
on chat tab complete:
    {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:
                set {_Player} to {chatnick1.%loop-player%}
            else:
                set {_Player} to "%loop-player%"
            set {_p} to {_l} first characters of "%{_Player}%"
            if "%{_p}%" is "%last token%":
                add "%{_Player}%" to completions
 
Last edited by a moderator:
Status
Not open for further replies.