Skip to main content
Zyra Store scripts are built with interoperability in mind. You can connect them with virtually any other resource on your server using FiveM’s native exports, events, and callbacks system. In this guide you will learn how to make the most of these tools to create a completely customized experience.

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 are GetPlayerData(), OpenMenu(), and TriggerCallback(). Below is how to call them from another resource:
other-resource/client.lua
Replace zyra-mi-script with the exact resource name as it appears in its folder and in your server.cfg. An incorrect name will cause a runtime error.
See all available exports in the client exports reference.

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
See the complete list of available events in the client events reference.

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.
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 your shared/config.lua:
shared/config.lua
Once enabled, each relevant player action will generate an embed in your Discord channel with the following format:

Using ox_lib with the scripts

When Config.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
You can also use 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.