GetAllWarehouses
aviso
Esta exportación solo está disponible para el lado del servidor!
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