diff --git a/fxmanifest.lua b/fxmanifest.lua index f8d3915..e17608b 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -1,6 +1,6 @@ name "Jim_Bridge" author "Jimathy" -version "alpha" +version "1.0" description "Framework Bridge By Jimathy" fx_version "cerulean" game "gta5" diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..9f8e9b6 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.0 \ No newline at end of file diff --git a/wrapper.lua b/wrapper.lua index bc820e9..8597a34 100644 --- a/wrapper.lua +++ b/wrapper.lua @@ -18,6 +18,18 @@ QBMenuExport = Exports and Exports.QBMenuExport or "" QBTargetExport = Exports and Exports.QBTargetExport or "" OXTargetExport = Exports and Exports.OXTargetExport or "" +function CheckBridgeVersion() + if IsDuplicityVersion() then + local currentVersion = "^3"..GetResourceMetadata("jim_bridge", 'version'):gsub("%.", "^7.^3").."^7" + PerformHttpRequest('https://raw.githubusercontent.com/jimathy/jim_bridge/duty-fixes/version.txt', function(err, newestVersion, headers) + if not newestVersion then print("^1Currently unable to run a version check for ^7'^3jim_bridge^7' ("..currentVersion.."^7)") return end + newestVersion = "^3"..newestVersion:sub(1, -2):gsub("%.", "^7.^3").."^7" + print(newestVersion == currentVersion and "^7'^3jim_bridge^7' - ^6You are running the latest version.^7 ("..currentVersion..")" or "^7'^3jim_bridge^7' - ^1You are currently running an outdated version^7, ^1please update^7!") + end) + end +end +CheckBridgeVersion() + for k, v in pairs(Exports) do if GetResourceState(v):find("start") then print("^6Bridge^7: '^3"..v.."^7' ^2export found ^7") end end