How to add MLO House

This page is dedicated to teach how to add a MLO House

How to

Creating the MLO:

Locate your Config.Houses inside main_config.lua file:

As you can see, thats all your houses created VIA CONFIG FILE.

You should leave config file to create new MLO houses and in game real estate job for normal houses and apartments.

On left side of this boxes we present the template, on right one we present the example.

["house_name"] = { -- House name, MUST BE UNIQUE OTHER WISE WILL HAVE ERRORS
        houseName = "house_name", -- House name, MUST BE UNIQUE OTHER WISE WILL HAVE ERRORS
        price = 25000, -- House price
        maxFurnitureRange = 45, -- max range to be able to furniture
        doorCoords = vector4(), -- House door coords
        doorInside = Config.Tiers["mloFranklin"], -- House inside infos
        houseGarage = {
            enabled = true, -- House garage enabled ?
            coords = vector3(), -- House garage door entrance
            doorInside = Config.Tiers["modGarage"], -- House garage inside infos
            storeCar = vector3(), -- House garage car storage
            spawnCar = vector4(), -- House garage car spawn
        },
        stars = 5, -- House rating
        pool = true, -- House have a pool?
        garden = true, -- House have a garden?
        camerasystem = true, -- House have a camera?
        canVisit = false, -- House can be visited?
        stashLevel = 1, -- What level is default level of stash?
        stashName = "", -- Stash name, must be unique, if same name houses can share their stash
        mlo = true, -- LEAVE ALWAYS TRUE IF YOU ARE CREATING A MLO House
        description = "" -- House description
    },

The first [""], you should write the same you will put as houseName inside the "", it needs to be UNIQUE, cant repeat it NEVER! (Check Example to understand better what we want to explain).

maxFurnitureRange is the range players will be able to put new furniture inside their house, this is great to adjust to perfection the zone, because MLOs can be big or small right? ( You can change this anytime so you can keep testing it )

doorCoords is the coords you will use to join, in this case will be the coords or main door of house, to provide infos to script work as intended.

doorInside is where you will setup all markers inside and their coords, the animations, the stash, the wardrobe, management zone and logout.

How i add a new interior infos? This part is very important, it allows you to add new MLOs informations. Navigate to Config.Tiers on config file, should be something like this:

As you can see, there you have ALL interiors informations of JPR Housing System, the next board, on left side will be the template, on right the example.

["MLO_NAME"] = {
        doorCoords = vector4(), -- see cameras interaction zone
        defaultStash = vector3(), -- default stash interaction zone
        defaultWardrobe = vector3(), -- default wardrobe interaction zone
        defaultLogout = vector3(), -- default logout interaction zone
        managementCoords = vector3(), -- default management interaction zone
        fridge = {coords = vector4(), fridgeItems = {interactions = {"beer", "soda", "champagne"}, interactionsCommands = {"e beer", "e soda", "e champagne"}}, label = "frigorifico"}, -- default fridge animations zone
        previewImage = nil, -- can leave nil ONLY ON MLOs
        isMLO = true, -- NEVER CHANGE THIS if you are creating a new MLO
    },

Now, on houseGarage is a very easy part:

houseGarage = {
  enabled = true, -- if you want MLO to have garage system, then set TRUE if not set FALSE
  coords = vector3(-815.35, 183.06, 72.43), -- House garage door entrance coords
  doorInside = Config.Tiers["modGarage"], -- House garage inside infos
  storeCar = vector3(-812.13, 187.36, 72.47), -- House garage car storage coords
  spawnCar = vector4(-811.69, 187.62, 72.48, 117.85), -- House garage car spawn coords
},

By default, we have 6 garages interiors (doorInside), they are: neonGarage, highGarage, midGarage, lowGarage, importGarage, modGarage Example, if you want highGarage then your doorInside of garage shoud look like this:

doorInside = Config.Tiers["highGarage"],

The rest of options are pretty easy and obvioslly, they are already explained on template on grey letters.

Congratulations, your first MLO house is created, now lets do the doords

If you dont want to lock your MLO doors via keyholders with doors, ignore this part.

Creating MLO doords:

Open mlo_doors_config.lua file and locate MLOConfig.MLOHouseDoors:

As you can see, it already includes some doors from Michael default MLO. The working of this system is similar to qb-doorlock to be easier to our customers creating new doors. On next box, left side is template, right one is example:

For single doords:

{
    houseName = "house_name_of_mlo", -- the name of MLO house this door is
    propName = "name_of_prop", -- the name of prop you want to lock
    propCoords = vector3(), -- the coords of prop you want to lock
    propTextCoords = vector3(), -- can be save as above, is the emojis coords
    locked = true, -- it will start locked? if yes set to true otherwise to false
    distance = 4 --- distance to interact with door, 4 is recommended
 },

For double doords:

{
   houseName = "house_name_of_mlo", -- the name of MLO house this door is
   propTextCoords = vector3(), -- is the emojis coords
   locked = true, -- it will start locked? if yes set to true otherwise to false
   distance = 2.0, --- distance to interact with door, 4 is recommended
   doors = {
       {
   	  propName = 'name_of_prop', -- the name of prop you want to lock
   	  propYam = 291.0, -- heading, not too important, sometimes can let the default
   	  propCoords = vector3() -- the coords of prop you want to lock
       },
   
       {
          propName = 'name_of_prop', -- the name of prop you want to lock
          propYam = 291.0, -- heading, not too important, sometimes can let the default
          propCoords = vector3() -- the coords of prop you want to lock
       }
    }
},

If you want to use doorHash, replace propName to propHash.

Congratulations, your doords are created and linked with your new MLO house.

How they are linked?

The anwser is pretty easy, as you know when you created the MLO on Config.Houses, you gave a unique houseName to your MLO right?

Then here on door creating, you have put on houseName the same name as before, that way the MLO is linked with this doords, in this case is myFirstMLOHouse.

Last updated