GetMTAVersion

From Multi Theft Auto: Wiki
Revision as of 20:09, 23 May 2008 by 50pence (talk | contribs) (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=== ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 least MTA:SA DM and come back!" )
    end
end
addEventHandler( "onClientPlayerJoin", getRootElement(), checkVersion )