Skip to main content
Client exports allow you to call functions exposed by Zyra Store scripts directly from other resources on your FiveM server. In Lua, the standard syntax for invoking an export is as follows:
Replace resource-name with the exact name of the Zyra Store resource (for example, zyra-mi-script) and FunctionName with the name of the function you want to invoke. All client exports must be called only from client-side scripts (client.lua).

GetPlayerData()

Returns a table with the current local player’s data. Use this function to access character information without needing to make a request to the server.
none
This function receives no parameters.
table
A table with the following fields:
other-resource/client.lua
If you need to access player data frequently (for example, on every frame or in multiple functions), save the result in a local variable to avoid repeated export calls. Update that variable only when the data may have changed, such as when receiving a server event.

OpenMenu(menuId)

Opens a specific script menu identified by its ID. Returns true if the menu opened correctly, or false if the ID does not exist or the menu is already open.
string
required
The identifier of the menu you want to open. Accepted values: 'main', 'admin', 'settings'.
boolean
true if the menu opened successfully; false otherwise.
other-resource/client.lua

CloseMenu()

Closes whichever menu is currently open. If there is no active menu, the call has no effect.
none
This function receives no parameters.
nil
This function returns no value.
other-resource/client.lua

TriggerCallback(name, cb, …)

Triggers a server-side callback and delivers the result back to the client through the cb function. You can pass additional arguments after the callback to send them to the server.
string
required
The name of the callback registered on the server (for example, 'zyra:getServerData').
function
required
The function that will execute when the server responds. Receives the returned data as an argument.
any
Additional optional arguments that will be sent to the server along with the callback request.
other-resource/client.lua

IsReady()

Returns true if the script has finished initializing and is ready to operate. Useful for avoiding calls to other exports before the resource has fully loaded.
none
This function receives no parameters.
boolean
true if the script is initialized and ready; false if it is still loading.
other-resource/client.lua

GetLocale(key)

Returns the localized text string corresponding to the provided key, according to the language configured in the script. If the key does not exist, the key itself is returned as a fallback.
string
required
The localization key defined in the script’s locales/*.lua files (for example, 'notify_success').
string
The translated text in the active language, or the key itself if no translation is found.
other-resource/client.lua

To see the exports available on the server side, visit the server exports reference.