Documentation Index
Fetch the complete documentation index at: https://docs.sure-developer.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
sure_lib is a focused Lua 5.4 helper library for FiveM resources that useox_lib and es_extended. It is designed around lazy module loading: a consuming resource imports one shared loader, then requests the module it needs through sure.getModule(moduleName).
Shared
validator, listener, track, and config run on both client and server.Client
player, spawn, lui, and client cooldown handle local runtime work.Server
db, esx, and server cooldown apply authoritative gameplay changes.Module catalog
| Module | Side | Purpose |
|---|---|---|
validator | Shared | Runtime schema validation for objects, arrays, primitives, callbacks, ranges, and enums. |
listener | Shared | Local and network event listeners with validator-backed argument checks. |
track | Shared | Small reactive state primitive with dependency-based effects. |
config | Shared | Cached Lua config loading with optional validator schemas. |
player | Client | Dynamic ESX player shortcuts, including inventory, accounts, loadout, ped, vehicle, and coords. |
spawn | Client | Ped/object spawning, streaming on proximity, and scoped cleanup. |
lui | Client | Lua-driven NUI rendering with builder and declarative node APIs. |
cooldown | Client and server | Synchronized position-keyed cooldown state with optional pause and reset behavior. |
db | Server | oxmysql-backed model helpers plus schema push/pull console commands. |
esx | Server | Safe transaction helpers for items and account money. |
Repository shape
fxmanifest.lua
init.lua
shared
init.lua
modules
validator
index.lua
listener
track
config
client
modules
server
modules
web
How data moves
Use sure_lib when you want small runtime helpers without hiding the underlying FiveM and ESX concepts.
