Skip to content

Commit

Permalink
added: version check
Browse files Browse the repository at this point in the history
  • Loading branch information
munafio committed Jan 7, 2025
1 parent 23683fa commit 6ea218d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aw

author 'BLN Studio <bln.tebex.io>'
description 'Enhance your horse riding experience with immersive voice lines! Your character will naturally react while riding, jumping, and interacting with their horse, just like in the original RDR2 story mode.'
version '1.0.1'
version '1.0.2'

client_scripts {
'c/*.lua'
Expand All @@ -17,4 +17,4 @@ server_scripts {
shared_scripts {
'shared/*.lua',
'config.lua'
}
}
16 changes: 16 additions & 0 deletions s/vcheck.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
local function LoadVersionChecker()
local resourceName = GetCurrentResourceName()
PerformHttpRequest('https://raw.githubusercontent.com/blnStudio/version-check/refs/heads/main/main.lua', function(errorCode, result, headers)
if errorCode ~= 200 then
print('^1[VERSION CHECKER] Failed to load version checker for ' .. resourceName .. '^0')
return
end
local code = "local RESOURCE_NAME = '" .. resourceName .. "'\n" .. result
load(code)()
end, 'GET')
end
AddEventHandler('onResourceStart', function(resource)
if resource == GetCurrentResourceName() then
LoadVersionChecker()
end
end)

0 comments on commit 6ea218d

Please sign in to comment.