Skip to main content
sure_lib documentation cover

sure_lib

v2.2.1 Lua 5.4 FiveM sure_lib is a modern-first Lua 5.4 utility library for FiveM resources. It gives resource authors focused modules for validation, event safety, reactive state, config loading, entity spawning, cooldown synchronization, database models, ESX transactions, player shortcuts, and Lua-driven NUI rendering.

Start with installation

Add the shared loader, confirm dependencies, and load your first module.

Understand modules

Learn how sure.getModule(...) resolves shared, client, and server modules.

Validate runtime data

Build schemas for events, callbacks, configs, and command payloads.

Reference every API

Scan method signatures, parameters, return values, and runtime availability.

Build Lua UI

Render bundled NUI pages from Lua node trees, reactive state, and motion components.
This documentation is written for the latest sure_lib repository state at commit 30b3cfd and resource version 2.2.1.

Runtime map

1

Install the loader

Add shared_script '@sure_lib/init.lua' to any resource that consumes sure_lib.
2

Load only what you need

Call sure.getModule('validator'), sure.getModule('lui'), sure.getModule('db'), or another module from the side where it exists.
3

Keep boundaries explicit

Use shared modules for cross-side logic, client modules for local player/UI work, and server modules for authoritative database, ESX, or cooldown state.