ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setServerConfigSetting

Function

setServerConfigSetting

ServerServerIdentical to MTA:SA

A function for changing a setting in the server configuration file.

Syntax

bool setServerConfigSetting(string name, string value [, bool save = false])

Arguments

namestring
Setting name.
valuestring
Value.
savebool, optional = false
Save to disk.

Returns

Always false in this version (with a warning).

Example

if not setServerConfigSetting("max_slots", "100") then setMaxPlayers(100) end

Notes

Limitation. Changing the configuration from a script is blocked; use setMaxPlayers and setServerPassword at runtime.

See also