mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-16 21:46:03 +01:00
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:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user