Store logo
Free Scripts

rps_lib

$0.00

Verifying account…

Description

[STANDALONE] rps_lib — Framework-Agnostic Utility Library (ESX / QBCore / QBox / Standalone)

rps_lib is a single utility resource that gives every other script on your server one consistent API, regardless of which framework and which third-party resources (inventory, target, phone, bank, dispatch, notifications...) you're actually running. Write your resource once against exports.rps_lib:*, and it works unmodified on ESX, QBCore, QBox, or no framework at all.

No dynamic file loading, no runtime magic — everything is declared natively in fxmanifest.lua, so it starts reliably every time.

Features

Core framework layer

  • Auto-detects ESX / QBCore / QBox / standalone on startup (or force it with Config.Framework)
  • GetFrameworkName, GetPlayerData, GetIdentifier, Notify
  • AddMoney / RemoveMoney / GetMoney (bank or cash)
  • GetJobs, SetPlayerJob, SetJob, HasPermission, CreateUseableItem
  • Offline/bulk player queries — GetOfflinePlayer, GetEmployeesByJob, GetAllCharacters, SetOfflinePlayerJob, AddOfflinePlayerMoney — work against the database directly, no need for the player to be online
  • Shared helpers: lib.table.*, lib.string.*, lib.math.*, lib.print
  • A client↔server callback bridge (RegisterServerCallback/TriggerServerCallback, RegisterClientCallback/TriggerClientCallback) with pcall isolation — one broken handler can't take down the shared dispatcher for every other resource using it

Garage

qb-garage, qbox-garage, esx-garage, none — GetGarageName, OpenGarage, GetPlayerVehicles, IsVehicleStored, SetVehicleStored

Progress bar

ox_lib, none — GetProgressBarName, ProgressBar (client), ServerProgressBar (server-initiated)

3D text

Camera-facing, distance-faded world text with no framework dependency:

  • DrawText3D / DrawText3DSimple — outline, background plate, bob animation, pulsing ground marker
  • fancy mode — breathing glow halo, accent border frame, two-tone title/subtitle text
  • lib.addText3D / lib.removeText3D / lib.hasText3D — register a point once, a shared thread redraws it forever (adaptive sleep: 0ms while visible, 500ms while idle)

Ambulance job

esx_ambulancejob, qb-ambulancejob, qbx_ambulancejob, none — GetAmbulanceJobName, IsPlayerDead, RevivePlayer

Rich notifications

ox_lib, codem-supreme-notification, none — GetNotificationModuleName, ShowNotification, plus the always-available plain Notify

Inventory

ox_inventory, tgiann-inventory, qb-inventory, ps-inventory, lj-inventory, none — GetInventoryName, HasItem, GetItemCount, AddItem, RemoveItem, GetInventory, ClearInventory, CanCarryItem, GetItemDefinition, GetItemCatalog, RegisterStash/OpenStash

Target / third-eye

ox_target, tgiann-target, qb-target, none — one canonical options shape across every integration: AddBoxZone, AddEntityTarget, AddModelTarget, RemoveZone, RemoveEntityTarget

Phone

lb_phone, qb_phone, none — OpenPhone, PhoneNotification, AddPhoneContact, GetPhoneNumber (client); SendPhoneMessage, StartPhoneCall, AddPhoneTweet, SendPhoneBankingNotification (server)

Bank

qb-banking, renewed-banking, qbox (native money fallback), none — GetAccountBalance, AddAccountMoney, RemoveAccountMoney, TransferAccountMoney

Dispatch

qb (qb-dispatch), qbx (y_dispatch), esx (native broadcast), ox (origen_police), ps (ps-dispatch), tk (tk_dispatch), none — one call, DispatchAlert(options), fires a correctly-shaped alert through whichever dispatch resource is actually installed, including an optional blip.radius search-area circle that works on every integration regardless of whether that resource draws one itself.

Highlights

Why use this over calling each resource directly

  • One export surface. Write exports.rps_lib:AddItem(...) once; it works whether the server runs ox_inventory or qb-inventory.
  • Auto-detection, not assumptions. Every module detects what's actually running at startup and prints a clear console banner — you always know exactly what it picked.
  • Real APIs, not guesses. Every third-party integration is built against that resource's actual documented exports (or its real installed source where docs were incomplete) — not assumed shapes. Where a field mapping is genuinely best-effort, it's called out explicitly in both the code and INTEGRATION_GUIDE.md.
  • Fails safe. A missing/unregistered item, an unconfigured integration, or a third-party export throwing internally returns false/0/nil with a clear console message instead of crashing your resource.