setServerConfigSetting | Multi Theft Auto: Wiki Skip to content

setServerConfigSetting

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function sets server settings which are stored in the mtaserver.conf file.

Note

This function is protected by default and must be explicitly allowed in the servers acl before it can be used.

Caution

"bandwidth_reduction" set to 'maximum' will cause player movement synchronization issues, on locations built outside 3000m radius from world center.

Syntax

bool setServerConfigSetting ( string name, string value, [ bool bSave = false ] )
Required Arguments
  • name: MISSING_PARAM_DESC
  • value: The value of the setting
Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.

  • bSave (default: false): Set to true to make the setting permanent, or false for use only until the next server restart.

Returns

  • bool: value

Returns true if the setting was successfully set, or false otherwise.

Code Examples

shared

This example enables network encryption

setServerConfigSetting( "networkencryption", "1", true )