SetServerRule

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

Sets a custom server rule visible in the server browser.

Syntax

  1. bool SetServerRule( string ruleName, string ruleValue )

Arguments

  • ruleName - The name of the rule you want to set
  • ruleValue - The value of the custom rule

Example

This example will make a custom server rule when someone types '/testrule'

  1.  
  2. function onPlayerCommand( id, cmd, text )
  3. {
  4. if ( cmd == "testrule" )
  5. {
  6. SetServerRule("Test Rule", "Test Value");
  7. }
  8. }
  9.  

Notes

The call onPlayerCommand was also used in the example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox