getVersion
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 gives you various version information about MTA and the operating system.
Note
Clientside will return the version from the player, and the server-sided will return version from the server.
Note
Current MTA version: mta -> 1.6 netcode -> 474 number -> 352 sortable -> 1.6.0-9.22279.0 tag -> 1.6-release-22279 type -> Release
Syntax
table getVersion ( )Returns
- table: value
Returns a table with version information. Specifically these keys are present in the table:
Code Examples
shared
This piece of code shows how you can use a simple command and a for loop to dump the output into chatbox, whilst capitalizing 1st character for extra bonus.
function showVersion(player) -- We use a for loop to dump the output into player chatbox outputChatBox("Version information (Server):", player, 0, 255, 0) for ind, dat in pairs(getVersion()) do -- Uppercasing first letter too outputChatBox(string.upper(string.sub(ind, 1, 1))..string.sub(ind, 2)..": "..dat, player, 0, 255, 0) endendaddCommandHandler("version", showVersion) -- Define our command handlerSee Also
Utility Functions
- addDebugHook
- bitAnd
- bitArShift
- bitExtract
- bitLRotate
- bitLShift
- bitNot
- bitOr
- bitReplace
- bitRRotate
- bitRShift
- bitTest
- bitXor
- createTrayNotification
- debugSleep
- decodeString
- deref
- downloadFile
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getFPSLimit
- getKeyboardLayout
- getLocalization
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getProcessMemoryStats
- getRealTime
- getServerIp
- getTickCount
- getTimerDetails
- getTimers
- gettok
- getUserdataType
- getVersion
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isShowCollisionsEnabled
- isShowSoundEnabled
- isTimer
- isTimerPaused
- isTransferBoxAlwaysVisible
- isTransferBoxVisible
- isTrayNotificationEnabled
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- ref
- removeDebugHook
- resetTimer
- setClipboard
- setDevelopmentMode
- setFPSLimit
- setTimer
- setTimerPaused
- setTransferBoxVisible
- setWindowFlashing
- sha256
- showCol
- showSound
- split
- teaDecode
- teaEncode
- tocolor
- toJSON
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub