Dream Services
Discord Shop
  • Home
    • Welcome
    • FAQ
    • Purchase
    • Keymaster
    • Common issues
  • Support
    • Support Policy
    • πŸ‡ΊπŸ‡ΈTicket Rules (EN)
    • πŸ‡©πŸ‡ͺTicket Rules (GER)
  • Development Guide
    • Create own locale
  • Product
    • 🎰Dream Vending
      • Config Preview
      • Installation
      • Item Use Effect API
    • 🚘Dream Used Cardealer
      • Config Preview
      • Installation
    • ⚑Dream Solarsystems
      • Config Preview
      • Installation
    • πŸ”ŒDream Solarjob
      • Config Preview
      • Installation
    • πŸͺ™Dream Cryptomining
      • Config Preview
      • Installation
      • Create Warehouses
      • Server
        • Exports
          • IsWarehouseAvailable
          • GetAllWarehouses
          • GetPlayerWarehouses
          • GetWarehouse
          • GetWarehouseWorth
          • GetWarehouseRevenue
          • GetWarehouseTransactions
          • GetWarehouseAllServer
          • GetWarehouseAllServerStatus
          • GetWarehouseServer
          • RefreshAllWarehouses
    • πŸš™Dream Fakeplates
      • Config Preview
      • IsPlateFake
    • 🐟Dream Fishing
      • Config Preview
    • πŸͺDream Market Stalls
      • Config Preview
    • 🚬Dream Smoking
      • Config Preview
      • Installation
Powered by GitBook
On this page
  1. Product
  2. Dream Cryptomining
  3. Server
  4. Exports

GetAllWarehouses

πŸ”§ Available since Version 1.0.5

This export is only available for serverside!

Export Syntax
exports['dream_cryptomining']:GetAllWarehouses() -- Returns a table with data

Response

Response Table
{
    "WAREHOUSEID" : {
        "id": int, -- WarehouseId
        "name": string, -- Warehouse Name
        "warehouse": string, -- [small, medium, large]
        "available": boolean, -- Is available to buy?
        "price": int, -- πŸ’Έ Warehouse Price
        "posx": float, -- Warehouse Position X
        "posy": float, -- Warehouse Position Y
        "posz": float, -- Warehouse Position Z
        "created_at": float, -- Unix Timestamp
        "updated_at": float, -- Unix Timestamp

        -- ⚠️ Only when assigned to a player
        "assigned": {
             "id": int, -- AssignedId
             "owner": string, -- Identifier of player
             "warehouse": int, -- WarehouseId
             "active": boolean, -- Is assignment active?
             "income": int, -- πŸ’Έ Current Income
             "outgoing": int -- πŸ’Έ Current Outgoing
             "created_at": float, -- Unix Timestamp
             "updated_at": float, -- Unix Timestamp
             "server": { -- Server Data
                "SERVERID": {
                    "status": string -- [active, inactive, broken, unavailable]
                },
                ...
            },
            "transactions": { -- All Transactions
                "TRANSACTIONID": {
                    "id": int, -- TransactionId
                    "warehouse": int, -- WarehouseId
                    "assigned": int, -- AssignedId
                    "transactionId": string -- TransactionId (e.g. T994826)
                    "type": string, -- [income, outgoing]
                    "status": string, -- [pending, complete]
                    "kwh": float, -- Kwh amount
                    "server": int, -- Server amount
                    "amount": int, -- πŸ’Έ Amount
                    "date": string, -- Formated Date (DD.MM.YYYY HH:MM)
                    "created_at": float, -- Unix Timestamp
                    "updated_at": float, -- Unix Timestamp
                },
                ...
            }
        }
    }
    ...
}
Example Export
local Warehouses = exports['dream_cryptomining']:GetAllWarehouses()

for key, value in pairs(Warehouses) do
    print(value.id) -- πŸ“Œ WarehouseId
    print(value.price) -- πŸ’Έ Warehouse Price
    print(value.warehouse) -- βœ‰οΈ Warehouse Type

    -- πŸ’¬ Use all other variables...
end
PreviousIsWarehouseAvailableNextGetPlayerWarehouses

Last updated 11 months ago

πŸͺ™