Skip to main content

Housing

Dependencies

V3

V2

Optional

Target

Robbery

Inventory

  • ox_inventory
  • qs-inventory
  • qb-inventory
  • lj-inventory
  • core-inventory
  • chezza
  • You can add your own! (Request to me if you want yours to be added)

Wardrobe

  • esx_skin
  • qb
  • fivem-appearance
  • Add your own its unencrypted for this function

Garages

Installation

V3

  1. Import the SQL file of your framework to your database
  2. Rename the script if its not named bcs_housing yet.
  3. Make sure you have the dependencies installed:
  4. Configure the config to your liking and framework ESX or QB
  5. ensure/start the script in your server cfg ensure bcs_housing
  6. Generate the images for furniture, follow this guide

V2

  1. Import SQL housing.sql to your database

  2. Put the script to the resources folder

  3. For ox_lib, comment this in the fxmanifest.lua

        client_scripts {
    -- '@menuv/menuv.lua',

    For menuv

        shared_scripts {
    -- '@ox_lib/init.lua',
  4. Configure the config to your liking and framework ESX or QB

  5. ensure/start the script in your server cfg ensure bcs_housing

  6. (OPTIONAL) Additionally if you want to use ox_lib instead of menuv you can comment the '@menuv/menuv.lua', in the fxmanifest.lua and enable ox_lib. After that replace this in all client files. If you are using Visual Studio Code CTRL + SHIFT + F then find this in all client files if IsResourceStarted("menuv") then replace with if false then.

QBCore

For QBCore, since menuv is already installed, comment ox_lib in the fxmanifest.lua

    shared_scripts {
-- '@ox_lib/init.lua',

Don't forget to change the configs accordingly such as the config/job.lua and change the job name to job_name = 'realestate', for default realestate qb job name.

Converting from V2 to V3

If you were using v2 previuosly you can follow this steps:

  1. Make sure to backup your database of the houses first
  2. Make sure no one is inside the server
  3. Use the command converthouse in the server console / txadmin live console
  4. Restart the housing script

Creating a house

  1. Use the command /createhome
  2. Fill the fields as needed
  3. Set the position of the entrance and optionally the garage
  4. Choose the shell and height placement for Shell, For MLO create the points

Adding Shells

  1. First add the shell resource into your server, usually start the folder that was provided to you.
  2. Enable debug mode in the config/config.lua, set it as true.
  3. In the game, use the command /testshell [shellname], e.g. /testshell shell_apartment1
  4. After being teleported, go towards the entrance/exit of the door inside.
  5. Use the command /getoffset to get the offset of the shell. It will be kept in offset.txt.
  6. Lastly, use the command /deleteshell to remove the temporary shell.
  7. Go into the file offset.txt and copy the shell into the config/shells.lua

Adding IPL

  1. Enable debug mode in the config/config.lua, set it as true.
  2. In the game, go to an existing IPL and move towards the entrance/exit.
  3. Use the command /addIPL [ipl] [label of the ipl], this will get the coordinate and saved to ipl.txt
  4. Copy the IPL Coordinate into the config/ipl.lua

Troubleshooting

Blinking / Flashing lights in the house(shells/ipl)

If you are using vSync, add this to your client code at the bottom. This is based on the popular vSync of Loaf edited version.

RegisterNetEvent('vSync:toggle')
AddEventHandler('vSync:toggle', function(bool)
weatherEnabled = not bool
end)

Error in the client console (F8): attempt to index a nil value (local 'entry')

This usually happens if you deleted a house manually from the database. Please run the cleanup.sql provided. This will clean owned_houses that does not exists in the house table. Do not worry, this query is safe.