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

[2.0.0]

Added

Vehicle Keys

  • tgiann-hotwire support (client + server) — GiveVehicleKey, RemoveVehicleKey (falls back to ignition removal, as this system has no native removeKey export by design)
  • New tgiann-hotwire-exclusive functions:
  • Client: HaveVehicleKey, IsKeyInIgnition, SetKeyInIgnition, CheckKeyInIgnitionWhenSpawn, SetNonRemoveableIgnition, SetVehicleLockStatus, ChangeEngineStateButton
  • Server: IsKeyInIgnition, SetKeyInIgnition, CheckKeyInIgnitionWhenSpawn, SetNonRemoveableIgnition
  • ak47_vehiclekeys, ak47_qb_vehiclekeys, cd_garage, qb-vehiclekeys, qbx_vehiclekeys support, matching the official ak47_lib vehicle-key module
  • Server → client event bridge (rps_lib:client:GiveVehicleKey / RemoveVehicleKey) for vehicle-key systems with no server-side export
  • RPS.DetectVehicleKeys() now checks 10 systems in priority order

Fuel

  • lc_fuel support (client) — GetVehicleFuel, SetVehicleFuel, plus new exclusive SetVehicleFuelType(vehicle, fuelType) ('regular' | 'plus' | 'premium' | 'diesel' | nil)
  • RPS.DetectFuel() now checks for lc_fuel

Inventory

  • Full ox_inventory export coverage added to both client and server bridges (previously only ~4 functions were wrapped):
  • Server: CanCarryAmount, CanCarryWeight, SetMaxWeight, SetSlotCount, GetSlot, GetSlotForItem, GetSlotIdWithItem, GetSlotIdsWithItem, GetSlotWithItem, GetSlotsWithItem, GetEmptySlot, GetItemSlots, Search, GetInventory, RegisterStash, CreateTemporaryStash, CustomDrop, CreateDropFromPlayer, ClearInventory, RemoveInventory, ConfiscateInventory, ReturnInventory, InspectInventory, ForceOpenInventory, GetCurrentWeapon, SetDurability, SetMetadata, UpdateVehicle, CanSwapItem, GetContainerFromSlot, SetContainerProperties, SetPlayerInventory
  • Client: GetItemCount, GetPlayerItems, GetPlayerWeight, GetPlayerMaxWeight, Search, GetSlotIdWithItem, GetSlotIdsWithItem, GetSlotWithItem, GetSlotsWithItem, GetCurrentWeapon, UseItem, UseSlot, SetStashTarget, DisplayMetadata, GiveItemToTarget, WeaponWheel, SuppressItemNotifications, IsInventoryBusy, IsInventoryOpen
  • ak47_inventory, ak47_qb_inventory, ps-inventory, lj-inventory, codem-inventory, origen_inventory, tgiann-inventory, core_inventory, jaksam_inventory, cheeza_inventory support across AddItem, RemoveItem, GetInventoryItems, CanCarryItem, image links, stash/search/busy state, and item-remove events
  • New _Lib.GetInventoryItem / _Lib.HasEnoughItem helpers (server)
  • Auto-detection thread with per-system server net-event registration (qb-inventory, ox_inventory)
  • Deferred callback registration to avoid a race against _Lib.Callback initialisation

Stress

  • New module: integration/client/stress.lua and integration/server/stress.lua
  • jg-stress-addon support — GetStress, GainStress, RelieveStress, ResetStress, SetStressLevel, IsPlayerJobWhitelisted (client); GetStress, GainStress, RelieveStress, ResetStress (server)
  • ps-stress and qb fallbacks where the addon's API doesn't have a 1:1 equivalent (e.g. no server resetStress export)
  • RPS.DetectStress() now checks for jg-stress-addon

Garage

  • New module: integration/server/garage.lua
  • jg-advancedgarages support (client) — StoreVehicleHousing, OpenGarageHousing extended with garageVehicleType/vehicleType and spawnCoords params
  • New jg-advancedgarages-exclusive functions:
  • Client: ShowImpoundForm, ShowPrivateGaragesDashboard, ShowChangePlateForm
  • Server: GetAllGarages, RegisterVehicleOutside (v3.2.5+), DeleteOutsideVehicle (v3.2.5+)
  • RPS.DetectGarage() now checks for jg-advancedgarages

Target

  • Full rewrite of integration/client/target.lua based on the ak47_lib target module
  • Automatic zone/entity/model/global-target cleanup on onResourceStop (prevents orphaned targets when a resource restarts)
  • qb-target-style → ox_target-style option conversion, merging job/gang/citizenid restrictions into a single groups table
  • New functions: AddBoxZone, AddPolyZone, AddCircleZone, RemoveZone, AddTargetBone, AddTargetEntity, RemoveTargetEntity, AddTargetModel, RemoveTargetModel, AddGlobalPed, RemoveGlobalPed, AddGlobalVehicle, RemoveGlobalVehicle, AddGlobalObject, RemoveGlobalObject, AddGlobalPlayer, RemoveGlobalPlayer
  • ak47_target support, checked alongside ox_target
  • RPS.DetectTarget() now checks for ak47_target

Core / Startup

  • Startup banners (server + client) expanded to show every detected module: Framework, Inventory, Target, Fuel, Vehicle Key, Garage, Banking, Notify, Progressbar, Stress (previously only 3–6 were shown depending on side)
  • RPS.PrintBanner redesigned with a fancier double-line box, centered title, ✔/✖ color-coded status icons (green = detected, red = none/unknown), and a version + timestamp footer
  • New table/string utilities in shared/core.lua: RPS.TableContains, RPS.MergeTable, RPS.TableLength, RPS.Trim, RPS.Split, RPS.Capitalise
  • RPS.Log added as an alias for RPS.Info
  • RPS.Warn added as a new logging level

Fixed

  • No such export GetCoreObject in resource qbx_core (client) — same root cause as the server-side fix above, but on the client's _Core detection retry loop. The QBX branch now breaks out of the loop immediately instead of calling a non-existent export every 500ms forever.
  • Silent QBX data loss in GetPlayerData, GetCoreConfig, GetJobs (client + server) — these functions all started with local c = GetCore(); if not c then return {} end. Since _Core is intentionally nil for QBX (see fix above), this guard always short-circuited before reaching the QBX-specific branch below it — meaning GetPlayerData() silently returned {} for every QBX player, and GetCoreConfig()/GetJobs() always returned {} on QBX servers, even though working QBX-specific code existed a few lines later that never ran. Each function now checks _Lib.Framework == 'qbx' before the GetCore() guard, so the QBX path no longer depends on a core object that doesn't exist. GetCoreConfig on QBX now explicitly documents that it returns {} (no equivalent export exists) rather than silently failing for an unrelated reason.
  • No such export GetCoreObject in resource qbx_core — QBX does not expose GetCoreObject; the QBX branch now sets _Core = nil since all QBX calls go through exports.qbx_core directly
  • attempt to index a nil value (local '_Lib') in integration/server/inventory.lua — added a nil-guard immediately after reading _G.RPS_Lib, so a failed framework init produces a clear error instead of a cascading crash
  • attempt to index a nil value (field 'Callback') in integration/server/inventory.lua — the callback registration ran before framework/server/init.lua finished setting up _Lib.Callback; it's now wrapped in a polling CreateThread that waits for _Lib.Callback to exist before registering
  • Startup banner misalignment — box-drawing border width didn't account for the ✔/✖ status icon prefix or footer text length, causing right-edge misalignment on every row; rewritten with a single-pass content-width calculation and verified against a standalone Lua test harness

Changed

  • config.lua comment blocks and _validValues tables updated to reflect every newly supported system (Inventory, Target, Fuel, VehicleKey, Garage, Stress)
  • fxmanifest.lua updated to register integration/client/stress.lua, integration/server/stress.lua, and integration/server/garage.lua
  • Version bumped 1.0.02.0.0 in fxmanifest.lua, shared/core.lua, and README.md