• How does this work?
    0 replies, posted
I don't understand why getAutoCompleteOptions are passed to arg instead of player or command. [lua] --Create a console command that says whatever is given to it in the server console. function myCommand(player,command,args) PrintTable(args) -- Print out all the arguments end --Put three options in the autocomplete list - Red, green, and blue. function getAutoCompleteOptions(commandName,args) return {"red","green","blue"} end concommand.Add("myCC",myCommand,getAutoCompleteOptions) --Now these options in getAutoCompleteOptions will show up while the user types --myCC in the console. [/lua] [editline]06:19AM[/editline] I just don't know how the arguments are linked.
Sorry, you need to Log In to post a reply to this thread.