OpsLab Books
Realplay Scripts /## [2.1.0]
Help Sign in Sign up
change logs

[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.lua and framework/server/init.lua as a long chain of if/elseif branches. It's been split into:
    framework/
    ├── 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 loader
    
    Each framework/<name>/client.lua / server.lua sets 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.lua load order updated — all three framework/<name>/client.lua files now load before framework/client/init.lua, and all three framework/<name>/server.lua files load before framework/server/init.lua, so every _G slot is set before the loader reads it.
  • No public API changes. Every function name, signature, and behavior documented in GUIDE.md is 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 an identifier and plate, 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 second GetPlayer lookup when a caller already has one. This is purely additive — every existing call site using the original single-argument form is unaffected.