Squirrel/Server/Functions/Server/SetServerRule
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|SetServerRule}} Sets a custom server rule visible in the server browser. == Syntax == <code>bool SetServerRule( string ruleName, string ruleValue )</code> == …') |
m (Redirect issue fix) |
||
Line 31: | Line 31: | ||
== Related Functions == | == Related Functions == | ||
− | {{Squirrel/Functions/Server}} | + | {{Squirrel/Server/Functions/Server}} |
Latest revision as of 18:34, 15 January 2012
Sets a custom server rule visible in the server browser.
[edit] Syntax
bool SetServerRule( string ruleName, string ruleValue )
[edit] Arguments
- ruleName - The name of the rule you want to set
- ruleValue - The value of the custom rule
[edit] Example
This example will make a custom server rule when someone types '/testrule'
function onPlayerCommand( id, cmd, text ) { if ( cmd == "testrule" ) { SetServerRule("Test Rule", "Test Value"); } }
[edit] Notes
The call onPlayerCommand was also used in the example. More info about this in the corresponding page.