GetMTAVersion: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Client function}} This function returns a string which tell you which MTA version player uses. ==Syntax== <syntaxhighlight lang="lua"> string getMTAVersion( ) </syntaxhighlight> ===Required Arguments=== ...) |
|||
Line 17: | Line 17: | ||
function checkVersion( ) | function checkVersion( ) | ||
if getMTAVersion( ) ~= "1.0 dp2.1" then | if getMTAVersion( ) ~= "1.0 dp2.1" then | ||
outputChatBox( "Download the | outputChatBox( "Download the latest MTA:SA DM and come back!" ) | ||
end | end | ||
end | end | ||
addEventHandler( " | addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), checkVersion ) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 07:27, 24 May 2008
This function returns a string which tell you which MTA version player uses.
Syntax
string getMTAVersion( )
Required Arguments
None
Returns
A string - currently: "1.0 dp2.1"
Example
function checkVersion( ) if getMTAVersion( ) ~= "1.0 dp2.1" then outputChatBox( "Download the latest MTA:SA DM and come back!" ) end end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), checkVersion )