add supress_updates variable to config

This new `fxmanifest.lua` variable (when true) will stop checking for script updates

People REALLY dont like being told when somethings fixed.

This will stop the update notifications for both `jim_bridge` and the script that loads it.
This commit is contained in:
Jim Shield
2025-08-27 19:40:11 +01:00
parent eafa881cf8
commit 315634c173
3 changed files with 153 additions and 130 deletions

View File

@@ -1,3 +1,13 @@
local function readBoolMeta(key, default)
local val = GetResourceMetadata(GetCurrentResourceName(), key, 0)
if not val then return default end
val = tostring(val):lower()
return (val == 'true' or val == '1' or val == 'yes' or val == 'on')
end
local SUPPRESS_UPDATES = readBoolMeta('suppress_updates', false)
if not SUPPRESS_UPDATES then
local function parseVersion(version)
local parts = {}
for num in version:gmatch("%d+") do
@@ -65,3 +75,4 @@ end
CheckBridgeVersion()
end

View File

@@ -7,7 +7,6 @@ rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aw
games { 'gta5', 'rdr3' }
lua54 'yes'
files {
'starter.lua',
'shared/*.lua',
@@ -25,3 +24,5 @@ client_scripts {
'clientFrameworkCache.lua',
'ui_modules/*.lua',
}
suppress_updates 'true' -- set to 'true' to disable update pings

View File

@@ -1,3 +1,13 @@
local function readBoolMeta(key, default)
local val = GetResourceMetadata("jim_bridge", key, 0)
if not val then return default end
val = tostring(val):lower()
return (val == 'true' or val == '1' or val == 'yes' or val == 'on')
end
local SUPPRESS_UPDATES = readBoolMeta('suppress_updates', false)
if not SUPPRESS_UPDATES then
function parseVersion(version)
local parts = {}
for num in version:gmatch("%d+") do
@@ -98,3 +108,4 @@ function CheckVersion()
end
CheckVersion()
end