Skip to content

Commit

Permalink
Changed version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuncion committed Dec 8, 2024
1 parent 96daaa2 commit f9f4056
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ Citizen.CreateThread(function()
if ResponseData.tag_name ~= ScriptMetadata.version then
print(('\27[1;46m[%s]\27[0m \27[1;37m🎄 A new version ^3%s\27[1;37m is available since ^3%s UTC\27[1;37m.^7'):format(ScriptMetadata.name, ResponseData.tag_name, os.date('%d.%m.%Y %H:%M:%S', ParseISODateString(ResponseData.published_at))))
print(('\27[1;46m[%s]\27[0m \27[1;37mPlease update it on ^5GitHub^7:\27[1;37m %s'):format(ScriptMetadata.name, ResponseData.html_url))
else
local DownloadCount = ResponseData?.assets?[1]?.download_count or 'few'
print(('\27[1;46m[%s]\27[0m \27[1;37m🎄 You are running the latest version like ^3%s^7\27[1;37m other people 🎅^7'):format(ScriptMetadata.name, DownloadCount))
end
else
ResponseData = json.decode(ErrorResponse:gsub('HTTP %d+: (.+)', '%1'))
Expand Down

0 comments on commit f9f4056

Please sign in to comment.