# Configuration

## Custom Stash

If you use an inventory other than **ox**, **qbcore,**, you can integrate the Stash Opening function suitable for your own inventory into this function.

```lua
function Utils.Functions.CustomInventory.OpenInventory(type, id, options)
    type = type or "stash"
    local maxWeight = options.maxWeight
    local slots = options.slots
    -- #
end

function Utils.Functions.CustomInventory.RegisterStash(stashId, options)
    local maxWeight = Config.InteriorHotelRoom.stash.maxWeight
    local slots = Config.InteriorHotelRoom.stash.slots
    local coords = Config.InteriorHotelRoom.coords.stash
    -- #
end
```

## Custom Wardrobe Setting

You can use your own clothing system by integrating it into this function. Below is an example. No settings are required for qb or esx default scripts.

```lua
-- Cloth menu event name for room wardrobe
Config.ClothMenuEventName         = nil
```

## Config File

```lua
--[[ Configuration settings ]]
Config                            = {}
---Locale setting for language localization.
Config.Locale                     = "en"

---@type EventName | nil -- Cloth menu event name for room wardrobe
Config.ClothMenuEventName         = nil
-- Can the rooms be entered without permission?
Config.UnauthorizedEntryIntoRooms = {
    --[[ Please Check client/utils:Utils.Functions.LockPickGame() ]]
    active = false,
    item = "lockpick",
    canUseStash = false,
}
--[[ The maximum number of rooms a player can get in an apartment ]]
Config.MaxRoomLimitPerPlayer = 1
--[[ max guest that can be added to the room ]]
Config.MaxGuestCanBeAddedToRoom = 5
--[[ Apartment Start | Not Support Mlo Apart ! ]]
Config.ApartmentStarting = true
--[[ Rooms can be purchased or just rented. ]]
Config.CanRoomsBePurchased = true
--[[ No Elevator Feature]]
Config.NoElevator = false
--[[ MetaKeys ]]
Config.MetaKeys = true
--[[ If qb-inventory is used and the version is higher than 2.0.0 then enable this setting, otherwise leave it disabled ]]
Config.NewInventoryQB = true

--[[ If you are using a starter apartment and there is no room available, it will start here. ]]
Config.NewPlayerStartCoords = vec3(0, 0, 0)

--[[ If you are using liberty city make this true. ]]
Config.LibertyCity = false

Config.OpenMenuWithTablet = {
    active = true,
    itemName = 'tablet',
}

--[[ Apartment Configs ]]

--[[ Commands ]]
Config.Commands = {
    -- [[ To Open the panel. ]]
    openPanel = "apartment", -- or nil
    --[[ Extend the rental in your current room. ]]
    extendRental = "extendrental",
}

--[[ Indicators ]]
Config.Indicators = {
    electricity = {
        unitPrice = 5, -- [[ Unit price at the time of purchase ]]
        maxValue = 1000 --[[ Max value that can be stored ]]
    },
    power = {
        unitPrice = 5,
        maxValue = 1000
    },
    gas = {
        unitPrice = 5,
        maxValue = 1000
    },
    water = {
        unitPrice = 5,
        maxValue = 1000
    },
}

--[[ InteriorHotelRoom ]]
Config.InteriorHotelCorridor = {
    ---@type "target" | "textui"
    interactionType = "textui",
    coords = {
        mainDoor = vec4(-425.4557, -831.4573, -169.4836, 163.6333),
        cameras = {
            [1] = vec4(-429.8342, -834.6968, -166.8, 287.3452),
            [2] = vec4(-416.0023, -804.9767, -162.5, 160.3329),
            [3] = vec4(-428.0974, -838.8970, -163.2, 336.4007),
            [4] = vec4(-416.0247, -805.0617, -154.2, 159.3935),
            [5] = vec4(-428.4543, -838.7031, -154.3, 307.3857),
            [6] = vec4(-416.0092, -804.9615, -153.7, 159.2749),
            [7] = vec4(-428.2982, -838.8560, -153.5, 334.6291),
        }
    }
}

--[[ InteriorHotelRoom ]]
Config.InteriorHotelRoom = {
    dynamicLightsEnteringRoom = false,
    coords = {
        door = vec3(-361.2132, -846.3577, -163.8098),
        enter = vec4(-361.239563, -844.298889, -164.8, 0.000000),
    }
}

--[[ !!! Don"t change coords !!! ]]
Config.Elevator = {
    coords = {
        stops = {
            [0] = vec3(-422.0714, -834.5255, -169.210),
            [1] = vec3(-422.0714, -834.5255, -164.39),
            [2] = vec3(-422.0714, -834.5255, -159.585),
            [3] = vec3(-422.0714, -834.5255, -155.67)
        },
        doors = {
            [0] = {
                left = vec3(-423.094, -833.318, -170.543),
                right = vec3(-423.622, -834.782, -170.543),
            },
            [1] = {
                left = vec3(-423.666, -834.755, -165.661),
                right = vec3(-423.146, -833.306, -165.661),
            },
            [2] = {
                left = vec3(-423.146, -833.308, -160.862),
                right = vec3(-423.666, -834.753, -160.862),
            },
            [3] = {
                left = vec3(-423.146, -833.308, -157.018),
                right = vec3(-423.666, -834.753, -157.018),
            },
        },
    },
    door_model = -1240156945
}

--[[ CCTV ]]
Config.CCTV = {
    Enabled = true,
    FOV = 80.0,
    MaxZoom = 30,
    MinZoom = 100,
    RotateSpeed = 0.3,
    Controls = {
        Left = 34,    -- lEFT Arrow
        Right = 35,   -- RIGHT Arrow
        ZoomIn = 96,  -- UP Arrow
        ZoomOut = 97, -- DOWN Arrow
        Exit = 194,   -- BACKSPACE
    }
}

--[[ Furniture-based stash ]]
Config.StashOptions = {
    active = true,
    slots = 10,
    maxWeight = 1000000,
    max_stash_count = 10,
}

--[[ Furniture-based wardrobe ]]
Config.WardrobeOptions = {
    active = true,
}

--[[ Apartments ]]
Config.Apartments = {
    [1] = {
        label = "Shelly Apart",
        tint = 55,
        coords = { enter = vec4(278.6257, -1118.3618, 29.4197, 179.6273) },
        blip = {
            active = true,
            title = "Shelly Apart #1",
            sprite = 476,
            color = 2,
            scale = 0.8,
            coords = vec3(278.202209, -1124.268188, 29.380981)
        },
    },
    [2] = {
        label = "Richman Apart",
        tint = 41,
        coords = { enter = vec4(-1383.5750, 267.0441, 61.2388, 283.2544) },
        blip = {
            active = true,
            title = "Richman Apart #2",
            sprite = 476,
            color = 2,
            scale = 0.8,
        },
    },
    [3] = {
        label = "Vespucci Apart",
        tint = 24,
        coords = { enter = vec4(-1237.5055, -859.0568, 13.1062, 215.8765) },
        blip = {
            active = true,
            title = "Vespucci Apart #3",
            sprite = 476,
            color = 2,
            scale = 0.8,
        },
    },
    ...
}

--[[ Rooms ]]
--[[ !!! Don"t change coords !!! ]]
Config.Rooms = {
    [1] = {
        label = "St. Sharen, 1/1",
        price = 10000,
        daily_price = 500,
        floor = 1,
        room_id = 1,
        coords = { door = vec4(-422.45, -827.43, -164.60, 70.85) },
    },
    [2] = {
        label = "St. Sharen, 1/2",
        price = 10000,
        daily_price = 500,
        floor = 1,
        room_id = 2,
        coords = { door = vec4(-420.7456, -822.9159, -164.60, 70.85) },
    },
    [3] = {
        label = "St. Sharen, 1/3",
        price = 10000,
        daily_price = 500,
        floor = 1,
        room_id = 3,
        coords = { door = vec4(-419.15, -818.5, -164.60, 70.85) },
    },
    ...
}

Config.InteriorMloApart = {
    active = true,
    label = "Kiiya Apart",
    lobby = {
        reception = vec3(-600.9936, 48.0622, 43.5314),
        door_coords = vec3(-595.4494, 24.9822, 43.2989),
        poly = {
            vec3(-606.2514, 38.6246, 43.6),
            vec3(-585.3315, 38.6610, 43.6),
            vec3(-585.7071, 51.4314, 43.6),
            vec3(-606.6401, 52.2651, 43.6),
        }
    },
    cameras = {
        [1] = vec4(-604.487, 48.261, 46.669, -123.0),
        [2] = vec4(-575.141, 53.899, 67.924, 92.0),
        [3] = vec4(-575.141, 53.899, 78.3, 92.0),
        [4] = vec4(-575.141, 53.899, 99.0, 92.0),
        [5] = vec4(-575.141, 53.899, 109.25, 92.0),
    }
}

Config.MloRooms = {
    [1] = {
        label = "Kiiya, 101",
        price = 10000,
        daily_price = 500,
        floor = 1,
        room_id = 1,
        door = {
            model = 1759602825,
            coords = vec3(-586.80, 50.66, 56.25),
            yaw = 0.0,
        },
        poly = {
            vec3(-589.0, 38.5, 57.11),
            vec3(-578.0, 38.5, 57.11),
            vec3(-578.0, 50.6, 57.11),
            vec3(-589.0, 50.6, 57.11),
        }
    },
    [2] = {
        label = "Kiiya, 102",
        price = 10000,
        daily_price = 500,
        floor = 1,
        room_id = 2,
        door = {
            model = 1759602825,
            coords = vec3(-591.56, 56.54, 56.25),
            yaw = 180.0,
        },
        poly = {
            vec3(-589.35, 56.5, 57.11),
            vec3(-600.35, 56.5, 57.11),
            vec3(-600.35, 68.7, 57.11),
            vec3(-589.35, 68.7, 57.11),
        }
    },
    ...
}

--[[ Wall Colors ]]
Config.WallColors = {
    { id = 1,  color = "#FFDB28" },
    { id = 2,  color = "#FF6F00" },
    { id = 3,  color = "#BF1F19" },
    ...
}

--[[ Furniture Items ]]
Config.FurnitureItems = {
    ["stashes"] = {
        label = "Stashes",
        items = {
            [1] = { model = "v_res_tre_storagebox", price = 2500, label = "Storage Box" },
            [2] = { model = "prop_devin_box_closed", price = 2500, label = "Devin Box" },
            [3] = { model = "prop_mil_crate_01", price = 2500, label = "Mil Crate 1" },
            [4] = { model = "prop_mil_crate_02", price = 2500, label = "Mil Crate 2" },
            [5] = { model = "prop_box_wood05a", price = 2500, label = "Box Wood 5" },
            [6] = { model = "prop_drop_crate_01", price = 2500, label = "Drop Crate 1" },
            [7] = { model = "prop_box_wood02a_pu", price = 2500, label = "Box wood 2 Pu" },
            [8] = { model = "prop_box_wood04a", price = 2500, label = "Box wood 4" },
            [9] = { model = "prop_crate_07a", price = 2500, label = "Crate 7" },
            [10] = { model = "prop_mb_crate_01a", price = 2500, label = "Crate 1" },
        },
    },
    ["wardrobe"] = {
        label = "Cloth Wardrobe",
        items = {
            [1] = { model = "v_res_tre_wardrobe", price = 2500, label = "V Wardrobe" },
        },
    },
    ["weed_planter"] = {
        label = "Weed Planter",
        items = {
            { model = "qua_weed_planter",       price = 2000, label = "Weed Planter" },
            { model = "qua_weed_planter_basic", price = 1000, label = "Weed Planter Basic" },
        }
    },
    ["weed_dryer"] = {
        label = "Weed Dryer",
        items = {
            { model = "qua_weed_dryer", price = 1000, label = "Weed Dryer" },
        }
    },
    ["weed_heather"] = {
        label = "Weed Heather",
        items = {
            { model = "qua_weed_heather",     price = 1000, label = "Weed Heather #1" },
            { model = "prop_elec_heater_01",  price = 1000, label = "Weed Heather #2" },
            { model = "prop_patio_heater_01", price = 1000, label = "Weed Heather #3" },
        }
    },
    ["weed_light"] = {
        label = "Weed Light",
        items = {
            { model = "prop_wall_light_05a",              price = 1000, label = "Wall Light" },
            { model = "ch_prop_ch_lamp_ceiling_w_01a",    price = 1000, label = "Lamp Ceiling" },
            { model = "h4_prop_x17_sub_lampa_small_blue", price = 1000, label = "Lamp Small Blue" },
        }
    },
    ["weed_fans"] = {
        label = "Weed Fans",
        items = {
            { model = "prop_fan_01",       price = 1000, label = "Fan 01" },
            { model = "v_res_fa_fan",      price = 1000, label = "Fa Fan" },
            { model = "prop_wall_vent_02", price = 1000, label = "Fan Went" },
        }
    },
    ["weed_table"] = {
        label = "Weed Table",
        items = {
            { model = "bkr_prop_weed_table_01a", price = 1000, label = "Table" },
        }
    },
    ...
}

```


---

# 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/0resmon-1/0r-resources/0r-apartments/configuration.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.
