Welcome to our RxHousing installation page. Here you can find the dependencies you need, instructions on how to start RxHousing, how to implement the appearance and garage script in client/opensource.lua, and Frequently Asked Questions(FAQ).
If you still can't install the script or encounter any errors, don't hesitate to create a ticket in our discord.
Install dependencies
Make sure you have installed all the dependencies. Without these scripts the RxHousing script will not work properly.
To make sure RxHousing works properly we need to make sure all scripts start in the right order in your server.cfg. Below you can find an example of how it can look like:
Your shells also need to start before the housing script to make sure everything works properly.
You can also create a folder called [rx] in your resource folder. If you have multiple scripts from us, you don't need to add them all to your server.cfg one by one. :)
-- First, we need to start "oxmysql"ensure oxmysql-- After oxmysql, start your frameworkensure es_extended/qb-core-- Don't forget to include ox_lib!ensure ox_lib-- After these three ^^^, you can start your inventory, appearance and garage scriptensure your_inventoryensure your_appearance_scriptensure your_garage-- Start your shellsensure your_shells-- Finally, we can start RxHousing :)ensure RxHousing or [rx]
Database
To ensure that a house you have created is saved, you need to make sure the .sql file is imported into your database. If you restart your server without doing this, the house will not be saved, and you will lose it.
Appearance and garage
Make sure your garage and appearance scripts have an event to open the menu and an event to store your vehicle in the garage. Otherwise, your script won't be compatible with our housing script.
As you can see, we have a number of pre-configured scripts. If you want to use another garage or appearance script, you can add it yourself by removing the code in the function and inserting your event.
-- function to open garage menufunctionOpenGarage(coords)if OKOKG thenTriggerEvent("okokGarage:OpenPrivateGarageMenu", vector3(coords.x, coords.y, coords.z), coords.w)elseError("No garage resource found (client/opensource.lua:OpenGarage)")endend-- function store vehiclefunctionStoreVehicleInGarage()if OKOKG thenTriggerEvent("okokGarage:StoreVehiclePrivate")elseError("No garage resource found (client/opensource.lua:StoreVehicleInGarage)")endend-- function openwardrobefunctionOpenWardrobe(propertyId)if FMAPP then exports["fivem-appearance"]:openWardrobe()elseif ILA thenTriggerEvent("illenium-appearance:client:openOutfitMenu")elseif QBClothing thenTriggerEvent('qb-clothing:client:openMenu')elseError("No wardrobe resource found (client/opensource.lua:OpenWardrobe)")endend
Below, you can see two examples of how the code might look. If you add your own event, make sure to remove the old code from the function.
functionOpenGarage()TriggerEvent('codem-garage:openHouseGarage')endfunctionStoreVehicleInGarage() house ='House garage'TriggerEvent('codem-garage:storeVehicle', house)end
Shells
The shells you saw on the preview are not included! You can download them from k4mb1. We have pre-configured free and paid shells from him.
We don't have a tool to decorate your home with furniture. So we advise to use a furnished shell.
You can easily add a shell in RxHousing. You can do that in the shells.lua, there you will also find a number of shells that we have pre-configured. Below you can find what the file looks like, and how you can add new shells.
You can add a new shell by copying another shell in the shells.lua. You need to change the name and the coords. The name has to be identical to the name of your shell.
Once you have copied the shell, you need to spawn it in-game to get the coords. You can use /shell:spawn shellname to spawn the shell and copy the offset coords.
Config.Shells["change_me"] = { -- Change the name of the shell to the name of your shell. offsets = { door =vector3(1.511230, -9.875488, -0.521904), -- change the offset coords doorHeading =14.050617218018, -- change the heading laptop =vector3(-5.873413, 1.514404, 0.247147), -- change the offset coords laptopHeading =340.99652099609, -- change the heading stash =vector3(0.181519, 6.426270, -0.521912), -- change the offset coords clothing =vector3(6.112793, 9.284424, -0.521912), -- change the offset coords },}