Skip to content

Commit 488c5c3

Browse files
committed
added: version check
1 parent a181413 commit 488c5c3

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

fxmanifest.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aw
55
name 'BLN Grenade'
66
description 'A grenade resource for RedM.'
77
authro 'BLN Studio <bln.tebex.io>'
8-
version '1.0.2'
8+
version '1.0.3'
99

1010
lua54 'yes'
1111

s/vcheck.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
local function LoadVersionChecker()
2+
local resourceName = GetCurrentResourceName()
3+
PerformHttpRequest('https://raw.githubusercontent.com/blnStudio/version-check/refs/heads/main/main.lua', function(errorCode, result, headers)
4+
if errorCode ~= 200 then
5+
print('^1[VERSION CHECKER] Failed to load version checker for ' .. resourceName .. '^0')
6+
return
7+
end
8+
local code = "local RESOURCE_NAME = '" .. resourceName .. "'\n" .. result
9+
load(code)()
10+
end, 'GET')
11+
end
12+
AddEventHandler('onResourceStart', function(resource)
13+
if resource == GetCurrentResourceName() then
14+
LoadVersionChecker()
15+
end
16+
end)

0 commit comments

Comments
 (0)