Client exports
Exports in Lua allow a resource to expose functions that other resources can call directly, without needing events. It is the simplest and most direct way to reuse logic between scripts. The three available client exports areGetPlayerData(), OpenMenu(), and TriggerCallback(). Below is how to call them from another resource:
other-resource/client.lua
Server exports
The script also exposes exports on the server side so other resources can register players, read the active configuration, and update player data in real time.other-resource/server.lua
Listening to client events
Zyra Store scripts emit events at key moments in the resource lifecycle and player actions. You can listen to these events from any other resource to react to them.other-resource/client.lua
Listening to server events
The server side emits its own events that you can capture to synchronize logic between resources or log administrative activity.other-resource/server.lua
Custom callbacks
Callbacks allow you to send a request to the server and receive a response back on the client asynchronously. Zyra Store scripts are compatible with both ESX and QBCore.- ESX
- QBCore
other-resource/client.lua
other-resource/server.lua
Integration with Discord Logs
Zyra Store scripts include an integrated Discord logging system. To activate it, configure the following options in yourshared/config.lua:
shared/config.lua
Using ox_lib with the scripts
WhenConfig.UseOxLib = true, Zyra Store scripts use ox_lib components for menus, inputs, and alerts, offering a modern and consistent interface.
Below is how to register and display a context menu with ox_lib:
client/main.lua
lib.inputDialog to request data from the player and lib.alertDialog for confirmations before executing critical actions.
Verify version compatibility before updating ox_lib. Check the
dependencies field in the fxmanifest.lua file of the Zyra Store resource to know the minimum required version of ox_lib. Using an incompatible version may cause unexpected errors in menus and inputs.For a complete reference of all available events and exports, see:
Client events
Complete list of events the script emits on the client side.
Client exports
All exported functions you can call from other resources.
