


A framework for chat command based server mods. Doesn't spam the chat, doesn't cover your HUD with unnecessarily large messages.
The mod is separated into modules all of which have extensive settings and apart from the core can be entirely disabled.
Messages: f_serverutils_localization.nut
Settings: f_serverutils_settings.nut
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.
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:

!rtv!help <page> - Lists commands the player is allowed to see ( check the API section ). Is paged to not spam the chat.
!name - Returns the name of the server ( ns_server_name ).
!owner - Returns the owner ( FSU_OWNER ).
!mods - Lists installed mods ( FSU_MODS ).
!rules - Lists rules ( FSU_RULES ).
!vote - Allows you to vote if a poll is active.
!usage <command> - Returns the command usage ( check the API section ).
!discord - Returns the discord message ( FSU_DISCORD ).
!rtv - Rock the vote, if enough players vote ( fsu_mapchange_fraction ) a map vote will start.
!skip - If enough players vote ( fsu_mapchange_fraction ) the map will be skipped based on playlist.
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, string group, void functionref( entity, array < string > ) callbackFunc, array < string > abbreviations = [], bool functionref( entity ) visibilityFunc = null )Registers your custom command
command
"!"at the start"!help"usage
"\x1b[113m!vote\x1b[0m <number> Allows you to vote on polls"group
!help <page/group> is plannedcallbackFunc
entity is playerarray < string > is an array of arguments, args[0] would be the first argument, the command isn't passed inabbreviations
[ "!dc", "!dikord", "!dicsord" ]visibilityFunc
!help command only shows allowed commands, same goes for !usage )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, bool show_result )Creates the poll. It is not recommended to pass an array larger than 7.
options
before
"Vote for a map!"duration
show_result
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.