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.
Command | Description |
| Administrative command to open the shop creation 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.
AddItemStock
local ok, err = exports['qs-shops-creator']:AddItemStock(shopId, 'water', 10) -- Adds stock to a specific item in a shopThis export allows you to increase the stock of a specific item in a shop created with qs-shops-creator. By providing the shop ID, the item name, and the quantity to add, the system will update the available stock for that item. It returns a boolean indicating success and an error message if something fails, making it useful for handling restocking logic, automated supply systems, or admin actions.
RemoveItemStock
local ok2, err2 = exports['qs-shops-creator']:RemoveItemStock(shopId, 'water', 5) -- Removes stock from a specific item in a shopThis export allows you to decrease the stock of a specific item in a shop created with qs-shops-creator. By providing the shop ID, the item name, and the quantity to remove, the system will update the available stock accordingly. It returns a boolean indicating whether the operation was successful and an error message if it fails, making it useful for handling purchases, item consumption, or manual stock adjustments.
SetItemStock
local ok3, err3 = exports['qs-shops-creator']:SetItemStock(shopId, 'water', 100) -- Sets the stock of a specific item in a shopThis export allows you to directly set the stock of a specific item in a shop created with qs-shops-creator. By providing the shop ID, the item name, and the exact quantity, the system will overwrite the current stock with the specified amount. It returns a boolean indicating success and an error message if something fails, making it useful for admin controls, syncing inventories, or resetting stock values.
GetItemStock
local qty = exports['qs-shops-creator']:GetItemStock(shopId, 'water') -- Gets the current stock of a specific item in a shopThis export allows you to retrieve the current stock of a specific item in a shop created with qs-shops-creator. By providing the shop ID and the item name, the system will return the available quantity for that item. It can return nil if the shop or item does not exist, making it important to validate the result before using it in your logic (e.g., restocking systems, purchase checks, or UI displays).



