> For the complete documentation index, see [llms.txt](https://titans-productions.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://titans-productions.gitbook.io/documentation/redm/scripts/housing.md).

# Housing

### Blips Management

There are currently (2) types for displaying property blips since there is a limitation. The RedM does not allow displaying blips after a specific amount, this issue already exists on old artifacts but there are some improvements on latest artifacts for increasing the limit.\
\
Below, you will see some explanation related to those (2) types for displaying based on your preferences.<br>

1. `DisplayPropertyId`  - Set to true if you want to display the property id on the properties that are for sell (Example: House #5)
2. `DisplayThroughRenderingDistance`  - This is the configuration option that enables all blips to be displayed on the map or through a player rendering distance. \
   \
   \- In case you are interested and don't want the map to flood with blips, set the desired distance to display a blip of the property that is for sale when a player is near / not (200.0 is a similar distance of the valentine in size).\
   \
   \- In case you want all blips to be displayed on the map, set the specified option to `false`, for example it should be: `DisplayThroughRenderingDistance = false` <br>

The configuration option to search and modify on `config/config.lua` file:

```lua
OnSale = { Sprite = 444204045, Color = 0xA5C4F725, DisplayPropertyId = false, DisplayThroughRenderingDistance = 200.0 }
```

### Doors Registration

The system does not understand and cannot find any custom doors unless you register them manually. All the MLO developers are and must provide you all the doorhashes to use to any kind of housing scripts (not only ours).

Once added the provided doorhashes of the MLO you have create a property / house, you have to create and register the doors on the property itself at `doors` table which is located inside on every property as required data.\
\
If the doors are double-doors and not a single door, you have to insert both doors, otherwise only the (1) door will be functional. If a door is a single door and not a double-door, you have to set \[2] to false as it is in the example.<br>

Example:

```lua
    doors = { 

        {
            [1] = { 
                objCoords = vector3(0.0, 0.0, 0.0), 
                objYaw = 0.0,

                textCoords  = vector3(0.0, 0.0, 0.0),
            },

            [2] = false, -- SET TO FALSE IF THERE IS NO SECOND DOOR.
        },

        -- if there are more doors, copy and paste the same table below.

    },
```

The doors require a `vector3` which has a x,y,z parameters. You can create yourself a vector3 by getting the doorhash coords directly and inserting them\
\
— Example, the X,Y,Z are always on the `doorhashes.lua` the (3) last parameters `(2633.9196777344,-1219.7867431641,58.596267700195)`

```lua
[3856177940] = {3856177940,-1860805927,"p_doornbfrench1a_x",2633.9196777344,-1219.7867431641,58.596267700195},
```

To create a vector3, you take those 3 last parameters and you add them inside the `vector3` :

```lua
vector3(2633.9196777344,-1219.7867431641,58.596267700195)
```

{% hint style="warning" %}
By default, we provide already many door registrations on `doorhashes.lua` file which is also the file you \
have to add manually the doorhashes that are provided by the MLO developer. If you don't add them, the doors will never be functional!
{% endhint %}
