# Integrators and Exports

## Custom Inventory For House Stash

If you are using one of the inventories we specified in the script, you can adjust your inventory here.

```lua
Config.CustomStash = function(HouseCode, StashNo)
    print(HouseCode) -- Unique House Code (like ID)
    print(StashNo) -- House Stash ID 
end
```

## Adding New House Shells

{% embed url="<https://youtu.be/9umXQ6xbcc8>" %}

## QB Garage Configure

In <mark style="color:red;">**qb-garages**</mark> script, if you are using `Config.SharedGarages = true` as true, you need to make this change in <mark style="color:red;">**qb-garages/server/main.lua**</mark> file.

***Old Code***

```lua
QBCore.Functions.CreateCallback('qb-garages:server:GetGarageVehicles', function(source, cb, garage, type, category)
    local Player = QBCore.Functions.GetPlayer(source)
    if not Player then return end
    local citizenId = Player.PlayerData.citizenid

    local vehicles

    if type == 'depot' then
        vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND depotprice > 0', { citizenId })
    elseif Config.SharedGarages then
        vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ?', { citizenId })
    else
        vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND garage = ?', { citizenId, garage })
    end

    if #vehicles == 0 then
        cb(nil)
        return
    end
    if Config.ClassSystem then
        local filteredVehicles = filterVehiclesByCategory(vehicles, category)
        cb(filteredVehicles)
    else
        cb(vehicles)
    end
end)
```

#### *New Code*

```lua
QBCore.Functions.CreateCallback('qb-garages:server:GetGarageVehicles', function(source, cb, garage, type, category)
    local Player = QBCore.Functions.GetPlayer(source)
    if not Player then return end
    local citizenId = Player.PlayerData.citizenid

    local vehicles

    if type == 'depot' then
        vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND depotprice > 0', { citizenId })
    elseif Config.SharedGarages then
        vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ?', { citizenId })
    else
        vehicles = MySQL.rawExecute.await('SELECT * FROM player_vehicles WHERE citizenid = ? AND garage = ?', { citizenId, garage })
    end

    for _,data in pairs(vehicles) do
        check = exports["0r_houses"]:IsVehicleInHouseGarage(data.plate)
        if check then
            table.remove(vehicles, _)
        end
    end

    if #vehicles == 0 then
        cb(nil)
        return
    end
    if Config.ClassSystem then
        local filteredVehicles = filterVehiclesByCategory(vehicles, category)
        cb(filteredVehicles)
    else
        cb(vehicles)
    end
end)
```

## Custom Wardrobe

If you use a different clothing system, you can integrate the wardrobe here.

```lua
Config.CustomWardrobe = function()
    -- Client or Server Event
end
```

## Vehicle Spawned Event

If you use the vehicle key script when the player leaves or enters the garage, you can integrate it here. The example below is for <mark style="color:blue;">**qb-vehiclekeys.**</mark>

```lua
Config.VehicleSpawnAddEvent = function(vehicle, plate)
    -- print(vehicle, plate)
    -- vehicle: vehicle
    -- plate: Vehicle Plate
    -- Usage for plate: plate
    TriggerEvent('vehiclekeys:client:SetOwner', plate)
end
```

## GetPlayerHouses

If you want to access a player's homes through a different script, you can use this function.

```lua
-- Client
local playerHouses = exports["0r_houses"]:GetPlayerHouses()

-- Server
local playerHouses = exports["0r_houses"]:GetPlayerHouses(source)
```

```lua
-- Export playerHouses
{
    [1] = {
        ["HousePrice"] = 5600000,
        ["DiscountValue"] = 1,
        ["Tenant"] = No Tenants,
        ["HouseName"] = Vinewood Loft 3,
    },
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0resmon.org/0resmon/0r-resources/0r-houses/integrators-and-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
