Below is a list of the main server-side and client-side events used in the script.
Server Events
These events are registered on the server side (server/main.lua) and are triggered by the client.
Event Name
Description
space_economy:server:getData
Triggered by the client when the NUI is opened. This event collects all economic data from players in the database (using the configured query) and sends it back to the client.
space_economy:server:saveData
Receives a JSON string containing the current economic data from the client and saves it as a log entry in the space_economy_logs table.
Client Events
This event is registered on the client side (client/main.lua) and is triggered by the server.
Event Name
Description
space_economy:client:getData
Receives the economic data from the server and passes it to the NUI for display.