[2.1.0]¶
Changed¶
- Major internal restructure: each framework now has its own folder. Framework-specific code (ESX/QB/QBX) no longer lives inline inside
framework/client/init.luaandframework/server/init.luaas a long chain ofif/elseifbranches. It's been split into:Eachframework/ ├── esx/ client.lua server.lua events.lua ├── qb/ client.lua server.lua events.lua ├── qbx/ client.lua server.lua events.lua ├── client/init.lua ← now a slim loader └── server/init.lua ← now a slim loaderframework/<name>/client.lua/server.luasets a global slot (e.g._G.RPS_Framework_ESX_Client) with a table of that framework's implementations. The loader files detect the active framework, read the matching slot, and merge it into_Lib. All three framework folders load unconditionally on every server (FXServer has no conditional script loading) — but only the active framework's functions are ever merged in; the other two's core-object lookups simply find nothing. fxmanifest.luaload order updated — all threeframework/<name>/client.luafiles now load beforeframework/client/init.lua, and all threeframework/<name>/server.luafiles load beforeframework/server/init.lua, so every_Gslot is set before the loader reads it.- No public API changes. Every function name, signature, and behavior documented in
GUIDE.mdis unchanged — this is a purely internal reorganization for maintainability._Lib.GiveVehicle(source, model)keeps its original 2-argument public signature even though the per-framework implementations underneath now also need anidentifierandplate, generated by a thin wrapper in the loader. - Many per-framework money/job/gang/metadata functions gained an optional trailing
p(pre-fetched player object) parameter to avoid a redundant secondGetPlayerlookup when a caller already has one. This is purely additive — every existing call site using the original single-argument form is unaffected.