GetVersion: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Fernando187 (talk | contribs) |
||
(28 intermediate revisions by 13 users not shown) | |||
Line 3: | Line 3: | ||
This function gives you various version information about MTA and the operating system. | 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: {{CurrentVersion}}}} | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">table getVersion ( )</syntaxhighlight> | <syntaxhighlight lang="lua">table getVersion ( )</syntaxhighlight> | ||
===Returns=== | ===Returns=== | ||
Returns a table with version information. Specifically these keys are present in the table: | Returns a table with version information. Specifically these keys are present in the table: | ||
*'''number:''' the MTA server or client version (depending where the function was called) in pure numerical form. | *'''number:''' the MTA server or client version (depending where the function was called) in pure numerical form, e.g. ''"256"'' | ||
*'''mta:''' the MTA server or client version in textual form. | *'''mta:''' the MTA server or client version (depending where the function was called) in textual form, e.g. ''"1.0"'' | ||
*'''name:''' the full MTA product name. | *'''name:''' the full MTA product name, either ''"MTA:SA Server"'' or ''"MTA:SA Client"''. | ||
*'''netcode:''' the netcode version number. | *'''netcode:''' the netcode version number. | ||
*'''os:''' | *'''os:''' returns the operating system on which the server or client is running | ||
*'''type:''' the type of build. can be "Nightly rX" | *'''type:''' the type of build. can be: | ||
**'''"Nightly rX"''' - A nightly development build. '''X''' represents the nightly build revision. | |||
**'''"Custom"''' - A build compiled manually | |||
**'''"Release"''' - A build that is publicly released (provisional). | |||
*'''tag:''' the build tag (from 1.0.3 onwards). Contains infomation about the underlying version used. i.e. The final version of 1.0.3 has the build tag of "1.0.3 rc-9". (This can be confirmed by using the console command 'ver'.) | |||
*'''sortable:''' a 15 character sortable version string (from 1.0.4 onwards). Format of the string is described in [[getPlayerVersion]]. | |||
==Example== | ==Example== | ||
{{Needs Example}} | |||
==See Also== | ==See Also== | ||
{{ | {{Utility functions}} |
Latest revision as of 13:59, 19 November 2024
This function gives you various version information about MTA and the operating system.
Syntax
table getVersion ( )
Returns
Returns a table with version information. Specifically these keys are present in the table:
- number: the MTA server or client version (depending where the function was called) in pure numerical form, e.g. "256"
- mta: the MTA server or client version (depending where the function was called) in textual form, e.g. "1.0"
- name: the full MTA product name, either "MTA:SA Server" or "MTA:SA Client".
- netcode: the netcode version number.
- os: returns the operating system on which the server or client is running
- type: the type of build. can be:
- "Nightly rX" - A nightly development build. X represents the nightly build revision.
- "Custom" - A build compiled manually
- "Release" - A build that is publicly released (provisional).
- tag: the build tag (from 1.0.3 onwards). Contains infomation about the underlying version used. i.e. The final version of 1.0.3 has the build tag of "1.0.3 rc-9". (This can be confirmed by using the console command 'ver'.)
- sortable: a 15 character sortable version string (from 1.0.4 onwards). Format of the string is described in getPlayerVersion.
Example
Script Example Missing Function GetVersion needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
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