-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversionChecker.lua
More file actions
78 lines (68 loc) · 3.33 KB
/
versionChecker.lua
File metadata and controls
78 lines (68 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--[[
───────────────────────────────────────────────────────────────
hsDevelopment 911 Script - Created by hsDevelopment Team!
Version: 1.0.2
Release Date: October 2025
Support: https://hammity.app/invite/t584eX9X
⚠️ DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING ⚠️
───────────────────────────────────────────────────────────────
]]
local branding =
[[
//
||
|| Made by Charley Q - Part of hsDevelopment™️
|| https://hammity.app/invite/t584eX9X
||]]
Citizen.CreateThread(function()
local CurrentVersion = GetResourceMetadata(GetCurrentResourceName(), 'version', 0)
if not CurrentVersion then
print('[^HS 911 Script^0] ^1Failed to retrieve current version metadata!')
return
end
PerformHttpRequest('https://raw.githubusercontent.com/Hamster-Systems/Script-Version/main/hsDev-911.json', function(err, response, headers)
if err == 200 then
local Data = json.decode(response)
if CurrentVersion ~= Data.NewestVersion then
if Config.VersionChecker.Enabled then
-- Full message
print(branding)
print(' ||')
print(' || ^1HS 911 Script is OUTDATED!^0')
print(' || Latest version: ^2' .. Data.NewestVersion .. '^0')
print(' || Your version: ^1' .. CurrentVersion .. '^0')
if Data.DownloadLocation and Data.DownloadLocation ~= '' then
print(' || ^3Download here:^0 ' .. Data.DownloadLocation)
end
if Data.Changes and Data.Changes ~= '' then
print(' || ^5Changes:^0 ' .. Data.Changes)
end
print(' ||\n \\\\\n')
else
-- Simplified message
if Data.DownloadLocation and Data.DownloadLocation ~= '' then
print('^1HS 911 Script is OUTDATED!^0 Download: ' .. Data.DownloadLocation)
else
print('^1HS 911 Script is OUTDATED!^0')
end
end
else
if Config.VersionChecker.Enabled then
-- Full message
print(branding)
print(' ||')
print(' || ^2HS 911 Script is up to date!^0')
print(' || ^3For support, join our Discord:^0 ^5https://hammity.app/invite/t584eX9X^0')
print(' || ^2Your version:^0 ^3' .. CurrentVersion .. '\n^0 ||\n \\\\\n')
else
-- Simplified message
print('^2HS 911 Script is up to date!^0')
end
end
else
print(branding)
print(' || ^1Error fetching latest version info.^0')
print(' || Contact support: ^5https://hammity.app/invite/t584eX9X^0\n^0 ||\n \\\\\n')
end
end, 'GET')
end)