Getting Started
sure_lib 2.2.1 This guide installs sure_lib into a consuming FiveM resource and loads a first module through the shared loader.Requirements
Runtime
FiveM with
fx_version 'cerulean', game 'gta5', and Lua 5.4 enabled.Dependencies
ox_lib and es_extended must start before sure_lib.The
db module also expects oxmysql to be available because it calls exports.oxmysql:*_async methods.Install
Place the resource
Put the
sure_lib folder in your server resources directory and make sure the folder name is exactly sure_lib.Start dependencies first
Start
ox_lib, es_extended, and then sure_lib before resources that consume it.fxmanifest.lua
fxmanifest.lua
Load a module
Common setup checks
sure.getModule returns nil
sure.getModule returns nil
Confirm the module name is valid and that you are requesting it from a supported runtime. For example,
player, spawn, and lui only exist on the client, while esx and db only exist on the server.ESX data is empty on client
ESX data is empty on client
Call
sure.player.waitUntilLoaded() before reading player data during resource startup.Cooldown state does not sync
Cooldown state does not sync
Define the cooldown on the server first, then read or start that key from the client.
