🤠
KOJA DOCS
  • Home
  • Store
  • Discord
  • lib
    • Client
  • NEW
    • 🚗Cardealer
      • Installation
      • Configuration
        • Creating a Cardealer
        • Changing Language
        • Creating a webhook for logging
    • 🎁Daily Rewards
      • Installation
      • Configuration
        • 🇵🇱Changing Language
        • 🛡️Debug Prints
        • 🚪Open Commands
        • 🛒Shop Link
        • ✏️Theme
        • 🖥️Auto Table
        • 🎁Rewards
        • 🎟️Missions
        • 📔Promocodes
      • Guides
        • ✈️Creating/Editing Locales
        • 🔫Managing Missions
        • 💎Setting Premium Status
    • 📊Hud
      • Installation
      • Configuration
        • 🇵🇱Changing Language
        • 🛡️Debug Prints
        • 🚪Settings Command
        • 🗺️Hide Minimap
        • 🗒️Notifications
        • 🏎️Nitro
        • ⚙️Engine
        • 💺Seatbelt
        • 🤖Cruisemode
      • Guides
        • ✈️Creating/Editing Locales
        • 🔗Progressbar
        • ℹ️TextUI
    • 🔫Shop Heist
      • Installation
      • Configuration
        • 🇵🇱Changing Language
        • 👮Required Police To Start Heist
  • 🛒Shops
    • Installation
    • Configuration
      • 🇵🇱Changing Language
      • 🎯Target
      • 🛍️Adding new shop
      • 🚗Server side exports
      • 📃SQL
    • Guides
      • ✈️Creating/Editing Locales
  • 📜Dialogs
    • Installation
    • Configuration
      • 🇵🇱Changing Language
      • 🎯Target
      • 📃Create Dialog
      • 🎹Available Keys
      • 🌀Default Images
  • OLD
    • 🎓Jobselector [FREE]
      • 📕Step By Step Guide
      • ⚙️Server
    • 🛠️Crafting [FREE]
      • 📕Step By Step Guide
      • 👇Client
      • 👆Server
Powered by GitBook
On this page
  1. Shops
  2. Configuration

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.

exports['koja-shops']:ToggleShop('shop_1', true)   -- Disables shop with ID 'shop_1'
exports['koja-shops']:ToggleShop('shop_2', false)  -- Enables shop with ID 'shop_2'

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.

exports['koja-shops']:ToggleProduct('shop_1', 'garden_shovel', true)  -- Disables product 'garden_shovel' in 'shop_1'
exports['koja-shops']:ToggleProduct('shop_1', 'burger', false)       -- Enables product 'burger' in 'shop_1'
PreviousAdding new shopNextSQL

Last updated 1 month ago

🛒
🚗