Scripting/Server/Functions/SetServerRule
Adds/updates/removes a key=value line shown in the server info (returned in browser queries). Returns bool.
Syntax
SetServerRule(key, value)DeleteServerRule(key)Arguments
- string key
- bool value
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "setserverrule" )
{
SetServerRule( "X", true );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- SetServerName
- SetPassword
- RemoveBuildingForPlayer
- SyncPlayerSkins
- ReloadScripts
- LoadScript
- UnloadScript
- GetScripts
- ToggleRagdollPhysics
- ToggleVehicleDents
- LoadModule
- GetTickCount
Section: Server information and administration
Categories: Server functions | Server information and administration