Server side exports
Exports implemented in the script
1. exports('ToggleShop', function(shopId, disabled)
Description:
This function is used to toggle the availability of a shop. By passing a shopId
and a boolean disabled
parameter, you can enable or disable a shop on your server.
Arguments:
shopId
(string): The unique identifier for the shop you want to enable or disable. Example:'shop_1'
,'shop_2'
.disabled
(boolean): A flag that determines whether the shop should be enabled or disabled:true
– disables the shop.false
– enables the shop.
2. exports('ToggleProduct', function(shopId, productId, disabled)
Description:
This function is used to toggle the availability of a specific product within a shop. By passing a shopId
, a productId
, and a boolean disabled
parameter, you can enable or disable specific products for sale in a shop.
Arguments:
shopId
(string): The unique identifier for the shop where the product is located (e.g.,'shop_1'
,'shop_2'
).productId
(string): The unique identifier for the product you want to enable or disable (e.g.,'garden_shovel'
,'fishing_rod'
).disabled
(boolean): A flag that determines whether the product should be enabled or disabled:true
– disables the product.false
– enables the product.
Last updated