Update sv_version_check.lua

This commit is contained in:
Dan
2019-12-08 00:33:04 +00:00
parent 0bb8df95c7
commit 861f5663e1

View File

@@ -1,7 +1,7 @@
--[[----------------------------------------------------------------------- --[[-----------------------------------------------------------------------
Wraith ARS 2X Wraith ARS 2X
Created by WolfKnight Created by WolfKnight
-----------------------------------------------------------------------]]-- -----------------------------------------------------------------------]]--
@@ -10,16 +10,16 @@ function GetCurrentVersion()
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 )
local curVer = GetCurrentVersion() local curVer = GetCurrentVersion()
print( "\n//\n|| Current Wraith ARS 2X Version: " .. curVer ) print( "\n//\n|| Current Wraith ARS 2X Version: " .. curVer )
print( "|| Latest Wraith ARS 2X Version: " .. text .."\n||" ) print( "|| Latest Wraith ARS 2X 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\\\\" )
end end
end ) end )