mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
Small bit of branding, changed version display text
This commit is contained in:
@@ -5,21 +5,32 @@
|
|||||||
|
|
||||||
-----------------------------------------------------------------------]]--
|
-----------------------------------------------------------------------]]--
|
||||||
|
|
||||||
|
local label =
|
||||||
|
[[//
|
||||||
|
|| __ __ _ _ _ _____ _____ ___ __ __
|
||||||
|
|| \ \ / / (_) | | | /\ | __ \ / ____| |__ \\ \ / /
|
||||||
|
|| \ \ /\ / / __ __ _ _| |_| |__ / \ | |__) | (___ ) |\ V /
|
||||||
|
|| \ \/ \/ / '__/ _` | | __| '_ \ / /\ \ | _ / \___ \ / / > <
|
||||||
|
|| \ /\ /| | | (_| | | |_| | | | / ____ \| | \ \ ____) | / /_ / . \
|
||||||
|
|| \/ \/ |_| \__,_|_|\__|_| |_| /_/ \_\_| \_\_____/ |____/_/ \_\]]
|
||||||
|
|
||||||
function GetCurrentVersion()
|
function GetCurrentVersion()
|
||||||
return GetResourceMetadata( GetCurrentResourceName(), "version" )
|
return GetResourceMetadata( GetCurrentResourceName(), "version" )
|
||||||
end
|
end
|
||||||
|
|
||||||
PerformHttpRequest( "https://wolfknight98.github.io/wk_wars2x/version.txt", function( err, text, headers )
|
PerformHttpRequest( "https://wolfknight98.github.io/wk_wars2x/version.txt", function( err, text, headers )
|
||||||
Citizen.Wait( 2000 )
|
Citizen.Wait( 2000 )
|
||||||
|
|
||||||
|
print( label )
|
||||||
|
|
||||||
local curVer = GetCurrentVersion()
|
local curVer = GetCurrentVersion()
|
||||||
|
|
||||||
print( "\n//\n|| Current Wraith ARS 2X Version: " .. curVer )
|
print( "||\n|| Current version: " .. curVer )
|
||||||
print( "|| Latest Wraith ARS 2X Version: " .. text .."\n||" )
|
print( "|| Latest version: " .. text .."\n||" )
|
||||||
|
|
||||||
if ( text ~= curVer ) then
|
if ( text ~= curVer ) then
|
||||||
print( "|| ^1Your Wraith ARS 2X version is outdated, visit the FiveM forum post to get the latest version.\n^0\\\\" )
|
print( "|| ^1Your Wraith ARS 2X version is outdated, visit the FiveM forum post to get the latest version.\n^0\\\\" )
|
||||||
else
|
else
|
||||||
print( "|| ^2Wraith ARS 2X is up to date!\n^0\\\\" )
|
print( "|| ^2Wraith ARS 2X is up to date!\n^0||\n\\\\" )
|
||||||
end
|
end
|
||||||
end )
|
end )
|
||||||
Reference in New Issue
Block a user