Quasar Store Logo

Commands and Exports

This section lists all available commands, exports, and events included in the script. You’ll find client-side, server-side, and shared functions designed to help developers integrate, extend, or interact with the system easily within their own scripts or frameworks.

Commands

This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.

CommandDescription
/givechips [id] [amount]Administrative command to give chips, membership required.
/deletemarket [id]Command for the worker to open the job menu.


Server Exports

This section provides all available server exports for the script. These functions allow developers to interact with the system from the server side, manage data, trigger actions, and integrate with other resources. Each export includes a clear description and a practical example to simplify its implementation.

GetMemberChips

GiveChipsToMember

local chipAmount = 100 -- Replace with the amount of chips to add exports['qs-diamondcasino']:GiveChipsToMember(source, chipAmount) print("Added " .. chipAmount .. " chips to player with ID " .. source)

Internally, the export logs the action (e.g., using a Debug function to output details like the identifier and the amount) to help with monitoring and troubleshooting.

RemoveChipsFromMember

local chipAmount = 50 -- Replace with the amount of chips to remove exports['qs-diamondcasino']:RemoveChipsFromMember(source, chipAmount) print("Removed " .. chipAmount .. " chips from player with ID " .. source)

This export requires the player's ID and the number of chips to deduct. It automatically processes the transaction and logs the action, making it an efficient way to manage casino chips.

ToggleLockCasino

The ToggleLockCasino export enables or disables the lock state of all casino doors based on the provided boolean value. When called, the function iterates through all the doors defined in Config.CasinoDoors, updating their locked status. It then notifies all clients about the change by triggering the casino:toggleLock event, and logs the action for debugging purposes.

local lockStatus = true -- Replace with false to unlock the casino doors exports['qs-diamondcasino']:ToggleLockCasino(lockStatus) print("Casino doors have been " .. (lockStatus and "locked" or "unlocked") .. ".")

This export is ideal for scenarios where you need to quickly secure or open access to the casino environment, ensuring that all associated doors are updated simultaneously.