GetMTAVersion: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Client function}}
This function returns a string which tell you which MTA version player uses.
This function returns a string which tell you which MTA version player uses. From DP2.1 onwards.
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 12:51, 24 May 2008

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

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 )