SetServerConfigSetting: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 19: | Line 19: | ||
** recommendedclientversion | ** recommendedclientversion | ||
** password | ** password | ||
** fpslimit | ** fpslimit - (0-100) | ||
** networkencryption | ** networkencryption - 0 for off, 1 for on | ||
** bandwidth_reduction | ** bandwidth_reduction - "none", "medium", "maximum" Set to maximum for less bandwidth usage | ||
** busy_sleep_time - (0-10) Set to 0 for more server FPS | |||
*'''value:''' The value of the setting | *'''value:''' The value of the setting | ||
Revision as of 17:31, 12 November 2011
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.
Available in 1.1 and onwards
Syntax
bool setServerConfigSetting ( string name, string value, [ bool bSave = false ] )
Required Arguments
- name : The name of the setting. Only certain settings can be changed with this function. These are:
- minclientversion
- recommendedclientversion
- password
- fpslimit - (0-100)
- networkencryption - 0 for off, 1 for on
- bandwidth_reduction - "none", "medium", "maximum" Set to maximum for less bandwidth usage
- busy_sleep_time - (0-10) Set to 0 for more server FPS
- value: The value of the setting
Optional Arguments
- bSave: Set to true to make the setting permanent, or false for use only until the next server restart.
Returns
Returns true if the setting was successfully set, or false otherwise.
Example
This example enables network encryption
setServerConfigSetting( "networkencryption", "1", true )
See Also
- addDebugHook
- base64Decode
- base64Encode
- debugSleep
- decodeString
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimerDetails
- getTimers
- getFPSLimit
- getUserdataType
- getVersion
- gettok
- isTransferBoxVisible
- setTransferBoxVisible
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setTimer
- ref
- deref
- sha256
- split
- teaDecode
- teaEncode
- toJSON
- tocolor
- getProcessMemoryStats
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace