GetMTAVersion: Difference between revisions
Jump to navigation
Jump to search
m (Visual improvement) |
|||
Line 23: | Line 23: | ||
end | end | ||
end | end | ||
addEventHandler( "onClientResourceStart", getResourceRootElement( | addEventHandler( "onClientResourceStart", getResourceRootElement(), checkVersion ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> |
Revision as of 16:33, 11 February 2015
This function returns a string which tell you which MTA version player uses. From DP2.1 onwards.
Syntax
string getMTAVersion( )
Required Arguments
None
Returns
A string - currently: "1.0 dp2.1"
Example
Click to collapse [-]
Clientfunction checkVersion( ) if getMTAVersion( ) ~= "1.0 dp2.1" then outputChatBox( "Download the latest MTA:SA DM and come back!" ) end end addEventHandler( "onClientResourceStart", getResourceRootElement(), checkVersion )
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown