


A framework for chat command based server mods. The mod is separated into modules all of which have extensive settings and apart from the core can be entirely disabled
The core module implements a chat and a poll handler. For more information on the API check the API section.
Welcome message example:

Poll example:

!rtvAll settings with comments are located in f_serverutils_settings.nut, the mod.json doesn't include any settings due to convar limitations.
It is highly recommended to change some of the settings such as fsu_owner so your players know who to contact when wanting to report something to the server owner.
Chat callbacks support ANSI escape codes, these allow you to change the colour of your text. An example of such a code is \x1b[113m which changes the colour to orange.
void function FSU_RegisterCommand ( string command, string usage, void functionref( entity, array < string > ) callbackFunc, array < string > abbreviations = [] ) )Registers your custom command
command
"!"at the start"!help"usage
"\x1b[113m!vote\x1b[0m <number> Allows you to vote on polls"callbackFunc
entity is playerarray < string > is an array of arguments, args[0] would be the first argumentabbreviations
[ "!dc", "!dikord", "!dicsord" ]bool function FSU_CanCreatePoll ()Returns true if you can create a poll, there can only be one poll at a time so to not conflict make sure you check this!
void function FSU_CreatePoll ( array < string > options, string before, float duration )Creates the poll. It is not recommended to pass an array larger than 7.
options
before
"Vote for a map!"duration
int function FSU_GetPollResultIndex ()Returns the index of the option which won the poll. If the 1st option won it will return 0. If there were no votes cast it returns -1.
Exactly what it says. When registering a command it needs to be lowercase.
Instead of "!Help" you need to register "!help".
When the user enters the command its case agnostic. Only when registering the command does it need to be lower case.