X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=Custom-server-votes.md;h=ef6994068b3c4955041a5af069598050cc889319;hb=9e492b1571b268003ca769a8441c15746fb0c41b;hp=a221f988e2c474ec003cda3721a513e66a083f08;hpb=d2380c36a9366207da0b02f951937b980300dd7a;p=xonotic%2Fxonotic.wiki.git diff --git a/Custom-server-votes.md b/Custom-server-votes.md index a221f98..ef69940 100644 --- a/Custom-server-votes.md +++ b/Custom-server-votes.md @@ -10,15 +10,26 @@ addvote nobots Now players will be able to type `vcall bots` or `vcall nobots` which will start a vote to have those commands issued. -Here's example that allows voting common server types assuming your `server.cfg` doesn't force them: +You can prefix the contents of an alias with `settemp` to make it be valid only for the current game. For example `alias nobots "settemp minplayers 0"`. + +You can create documentation for your votes by creating cvars with the `sv_vote_command_help_%VOTE_NAME%` pattern, for example: + +``` +set sv_vote_command_help_bots "\nUsage:^3 vcall bots\n^7 Adds some bots to the server." +``` + +Here's example that allows voting common server types assuming your `server.cfg` doesn't force them (you get infinite recursion if it does): ``` -alias vanilla "exec defaultXonotic.cfg; exec server.cfg; endmatch" +alias vanilla "exec ruleset-xonotic.cfg; exec server.cfg; endmatch" addvote vanilla +set sv_vote_command_help_vanilla "\nUsage:^3 vcall vanilla\n^7 Resets the server to vanilla ruleset." -alias instagib "exec defaultXonotic.cfg; exec server.cfg; g_instagib 1; g_grappling_hook 1; endmatch" +alias instagib "exec ruleset-xonotic.cfg; exec server.cfg; g_instagib 1; g_grappling_hook 1; endmatch" addvote instagib +set sv_vote_command_help_instagib "\nUsage:^3 vcall instagib\n^7 Sets the server to instagib ruleset." -alias overkill "exec defaultOverkill.cfg; exec server.cfg; endmatch" +alias overkill "exec ruleset-overkill.cfg; exec server.cfg; endmatch" addvote overkill -``` \ No newline at end of file +set sv_vote_command_help_overkill "\nUsage:^3 vcall overkill\n^7 Sets the game to overkill ruleset." +```