Handling
Vehicle tuning tablet for Qbox, QBCore and ESX (auto-detected). Migrates from jg-handling and keeps its tables (handling_profiles, handling_vehicle_data), so every existing tune keeps working.
#Who can use it
- Admins:
/handlingopens the tablet anywhere (ACEConfig.AdminAce, defaultgr1m.handling.admin, plusConfig.AdminAceFallback). - Staff: an admin issues a
handling_tabletitem from Admin → Tablets. It is bound tothat character (citizenid in metadata) and refuses anyone else. The server re-checks the binding, the item and the revoked flag on every action. Revoke wipes it from every online inventory; an offline copy is wiped the next time someone uses it.
- Staff tablets get packages + sliders inside the class limits. Advanced (raw fields) is
off unless an admin turns it on for that tablet.
#Flow
- Pick cars: networked cars within the admin radius, or "every <model> in the city".
- Choose a package: Hyper-realistic / Realistic / Semi-realistic / Arcade per GTA
vehicle class, then fine-tune with plain sliders (acceleration, top speed, grip, braking, stability, damage taken).
- Test and apply: test drive with the timing overlay (K flips stock/new, Backspace
returns), then apply. Each car is saved to its own plate with a revision.
History lists every change with owner and editor; Undo restores the previous state (only the newest change per car; staff can undo their own).
#Limits (server-side, always)
- Every value is recomposed on the server from stock + package + sliders; the client never
sends a final handling table that gets stored.
- Per class: top speed boost, acceleration boost (fractions over the car's own stock),
damage taken min/max, staff slider room. Packages are always capped; admin raw edits only stay inside
config/config.fields.luaranges (stretched to include stock). - Stock is taken from the saved row, then
gr1m_handling_stock(per model), then thefirst client snapshot (Mech stock export when Mech runs).
#Admin tab
Tablets, Class limits, Packages (+ model class overrides) and Settings (radius, unit, timing tool for everyone, history retention, Discord webhook). Stored as JSON in gr1m_handling_settings; unit/targets are published in GlobalState.gr1m_handling_public.
#Install / update
- Add
handling_tabletfrominstall/ox_inventory-items.luatoox_inventory/data/items.lua.ox_inventory needs a full restart to pick up a new item.
- Tables are created/extended automatically on start (additive only).
#GR1M_Mech boundary
GR1M_Handling owns the absolute base (gr1m_handling statebag); Mech composes parts, wear and stance on top. Saves, undo and resets re-publish the base on live cars so Mech recomposes without a respawn. The base is only re-published when it actually changed.
#Exports
Server: GetHandlingForVehicle, ApplyToNet, SaveHandlingForPlate, SaveHandlingForModel, DeleteHandlingForPlate, DeleteHandlingForModel, GetProfiles, useTablet (item hook). Client: OpenEditor, OpenTimingTool, CloseTimingTool, GetBaseVehicleHandling, ApplyHandlingData, ResetVehicleHandling. JG event aliases stay in client/bridge_jg.lua.
GR1M