-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
62 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
cd_carhud | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
Citizen.CreateThread(function() | ||
Citizen.Wait(5000) | ||
local function ToNumber(cd) return tonumber(cd) end | ||
local resource_name = GetCurrentResourceName() | ||
local current_version = GetResourceMetadata(resource_name, 'version', 0) | ||
PerformHttpRequest('https://raw.githubusercontent.com/RampBST/Codesign_Versions/master/cd_devtools.txt',function(error, result, headers) | ||
if not result then return end | ||
local new_version = result:sub(1, -2) | ||
if new_version ~= current_version then | ||
print('^2['..resource_name..'] - New Update Available.^0\nCurrent Version: ^5'..current_version..'^0\nNew Version: ^5'..new_version..'^0') | ||
PerformHttpRequest('https://raw.githubusercontent.com/RampBST/Codesign_Versions_V2/master/'..resource_name..'.txt',function(error, result, headers) | ||
if not result then print('^1Version check disabled because github is down.^0') return end | ||
local result = json.decode(result:sub(1, -2)) | ||
if ToNumber(result.version:gsub('%.', '')) > ToNumber(current_version:gsub('%.', '')) then | ||
local symbols = '^'..math.random(1,9) | ||
for cd = 1, 26+#resource_name do | ||
symbols = symbols..'=' | ||
end | ||
symbols = symbols..'^0' | ||
print(symbols) | ||
print('^2['..resource_name..'] - New Update Available.^0\nCurrent Version: ^5'..current_version..'^0.\nNew Version: ^5'..result.version..'^0.\nNotes: ^5'..result.notes..'^0.') | ||
print(symbols) | ||
end | ||
end,'GET') | ||
end) |