Files
jim_bridge/starter.lua

128 lines
3.5 KiB
Lua
Raw Normal View History

2025-04-07 20:52:59 +01:00
gameName = not IsDuplicityVersion() and GetCurrentGameName()
Exports = {
QBExport = "qb-core",
QBXExport = "qbx_core",
ESXExport = "es_extended",
OXCoreExport = "ox_core",
OXInv = "ox_inventory",
QBInv = "qb-inventory",
PSInv = "ps-inventory",
QSInv = "qs-inventory",
CoreInv = "core_inventory",
CodeMInv = "codem-inventory",
OrigenInv = "origen_inventory",
OXLibExport = "ox_lib",
QBMenuExport = "qb-menu",
QBTargetExport = "qb-target",
2025-04-07 20:52:59 +01:00
OXTargetExport = "ox_target",
-- REDM
RSGExport = "rsg-core",
RSGInv = "rsg-inventory"
}
-- Required variables
debugMode = Config.System.Debug
2025-04-20 01:22:32 +01:00
-- Check server convars for hard set defaults
if Config and Config.System then
if Config.System.Debug then
2025-04-20 19:17:16 +01:00
if GetConvar("jim_DisableDebug", "false") == "true" then
debugMode = false
end
if GetConvar("jim_DisableEventDebug", "false") == "true" then
Config.System.EventDebug = false
end
2025-04-20 01:22:32 +01:00
end
2025-04-20 19:17:16 +01:00
2025-04-20 01:22:32 +01:00
Config.System.Menu = GetConvar("jim_menuScript", Config.System.Menu)
Config.System.Notify = GetConvar("jim_notifyScript", Config.System.Notify)
Config.System.ProgressBar = GetConvar("jim_progressBarScript", Config.System.ProgressBar)
Config.System.drawText = GetConvar("jim_drawTextScript", Config.System.drawText)
Config.System.skillCheck = GetConvar("jim_skillCheckScript", Config.System.skillCheck)
2025-04-20 19:17:16 +01:00
if GetConvar("jim_dontUseTarget", "false") == "true" then
Config.System.DontUseTarget = true
end
2025-04-20 01:22:32 +01:00
end
QBInvNew = true
InventoryWeight = 120000
-- Load files here into the invoking script
for _, v in pairs({ -- This is a specific load order
2025-04-20 01:22:32 +01:00
--'convarCheck.lua',
'helpers.lua', -- needs to be first
'_loaders.lua',
'_eventDebug.lua',
'callback.lua',
2025-04-08 17:47:12 +01:00
'coreloader.lua', -- needs to be second to load all core related stuff before everything else
'duifunctions.lua',
-- Native Scaleforms
'scaleforms/scaleform_basic.lua',
'scaleforms/bigMessageInstance.lua',
'scaleforms/countDownHandler.lua',
'scaleforms/debugScaleform.lua',
'scaleforms/instructionalButtons.lua',
'scaleforms/timerBars.lua',
-- Required functions
'make/loaders.lua',
'make/makeBlip.lua',
'make/makePed.lua',
'make/makeProp.lua',
'make/makeVeh.lua',
'make/cameras.lua',
'make/progressBars.lua',
'wrapperfunctions.lua',
'polyZone.lua',
'inventories.lua',
'itemcontrol.lua',
'playerfunctions.lua',
'metaHandlers.lua',
'jobfunctions.lua',
'societybank.lua',
'phones.lua',
-- Interactions
'targets.lua',
'contextmenus.lua',
'input.lua',
'notify.lua',
'drawText.lua',
2025-03-26 21:43:48 +00:00
'skillcheck.lua',
-- Crafting / Shops / Stashes
'crafting.lua',
2025-03-26 21:43:48 +00:00
'shops.lua',
'stashcontrol.lua',
-- Kind of "other"
'isAnimal.lua',
'scaleEntity.lua',
'vehicles.lua',
'effects.lua',
-- Do version check last
'_scriptversioncheck.lua'
}) do
if debugMode then
--print("^5Loading^7: 'jim_bridge/shared/"..v.."' ^2into ^7'"..GetCurrentResourceName().."' ...")
end
local fileLoader = assert(load(LoadResourceFile('jim_bridge', ('shared/'..v)), ('@@jim_bridge/shared/'..v)))
fileLoader()
if debugMode then
print("^5Success^7: ^2loaded file^7: ^3"..(v):gsub("/", "^7/^3"):gsub("%.lua", "^7.lua").."^7")
end
2025-04-07 20:52:59 +01:00
end