ServerRules: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:


== Using Rules ==
== Using Rules ==
Rules can be added in two ways: using the [[ServerConfiguration|server configuration xml]] via the <rule> tag or using the server-side scripting functions [[server.setRule|server.setRule]] and [[server.getRule|server.getRule]]. Setting a rule's value to null will delete the rule. Server rules are case sensitive so for example, "test" and "Test" will display as separate rules.<br>
* Rules can be added in two ways: using the [[ServerConfiguration|server.xml]] via the <code><rule></code> tag or using the server-side scripting functions [[server.setRule|server.setRule]] and [[server.getRule|server.getRule]].  
For example, using the server configuration xml:<br>
* Setting a rule's value to null will delete the rule. Server rules are case sensitive so for example, "test" and "Test" will display as separate rules.<br>
{{CodeSyntax|1=<rule name="Website" value="https://example.com/" />}}
* Server.xml Example: <code><rule name="Owner" value="Your_Name" /></code><br>
* Scripting Example: <code>server.setRule("Owner", "Your_Name")</code><br>


== Built-in Rules ==
== Rules with Extra Features ==
There are a few built-in rules that should be used to take advantage of extra features that GTA Connected provides:
There are a few built-in rules that should be used to take advantage of extra features that GTA Connected provides:
{| class="wikitable"
{| class="wikitable"
Line 18: Line 19:
|Website
|Website
|Setting a website will take users to the URL provided in their default browser when they choose "Visit Website" when right-clicking on your server in the launcher
|Setting a website will take users to the URL provided in their default browser when they choose "Visit Website" when right-clicking on your server in the launcher
|-
|Discord
|Setting a discord URL will open the invite link in the browser (which will connect to the discord app if it's installed) by right-clicking on the '''discord''' line in the rules section and choosing "Visit Website"
|}
|}
2,813

edits