
You are viewing a potentially older version of this package. View Latest Version

mod that makes creation of chat commands easier
the default file is mod/commands.gnut, if you want to add your own make sure you add it to the mod.json (basically just copy the existing mod/commands.gnut script entry but change the path)
first create your command function in mod/scripts/vscripts/mod/commmands.gnut (or your custom file), call it something that isnt already taken
if using your own file, make sure to add globalize_all_functions or manually global <function>
make sure your function takes the args of array<string> args, even if it doesn't need them
edit chat.gnut and add your command to the commands table in chat_Init format is as follows
commands = {
<chat command> = {
func = <your function name>,
args = <arg count>
}
}
there are some premade commands in mod/commands.gnut (thats why it requires my utils thingy)