Skip to content

Installation

S4 House Installation Document and Basic Concepts

This installation guide covers both ESX and QBCore frameworks.

Required Resources#

If you do not install all the necessary scripts, the script cannot run.

ResourceDownload
screenshot-basicDownload
0r-coreDownload
qua_adez_hotelIt is given to you when you purchase it.
qua_houses_s4It is given to you when you purchase it.

Config.PhotoWebhook#

Create a new webhook in Discord. And place the webhook link in the Config.PhotoWebHook section in config.lua.

lua
Config.PhotoWebhook = "" -- Discord Webhook

Supported Inventories#

  • qb-inventory
  • qs-inventory
  • ox_inventory
  • ps-inventory
  • lj-inventory
  • origen_inventory
  • ls-inventory
  • core-inventory

My Inventory Not in this list#

In this case, you must enter the stash code of your own inventory into the Config.StashFunction function in config.lua.

For Example (chezza_inventory)#

lua
Config.StashFunction = function(id, house)
  local HouseId = 0
  if Config.RealEstateJob then HouseId = house.dataid else HouseId = house.id end
  TriggerEvent('inventory:openInventory', {
    type = "stash",
    id = 'House'..HouseId,
    title 'House'..HouseId,
    weight = 100,  -- set to false for no weight
    delay = 0, -- open delay for the roleplays :)
    save = true -- save to database
})
end 

server.cfg#

text
--- main core ----
start screenshot-basic
start 0r-core
start s4-house 
start qua_adez_hotel
start qua_houses_s4
--- other resources ---

Setup Database#

And you must install the database sql. Select the sql file suitable for your infrastructure in the sql folder and install it in your database.

Realestate#

If you are going to use the real estate agent system, do not forget to add a profession called "realestate".

Final#

Now you can start the server and use the script. Remember that it is opened with the /studio command.


I cannot download YouTube videos. How do I solve it?

If YouTube videos are not downloading, you can find a solution by downloading an old version of ytdl-core. It will work more stable, but the videos will download late.

You can solve this problem by using the command below.

npm i ytdl-core@4.9.1

If you want to update ytdl-core again, you can use the code below. If a new ytdl-core is released, try it, it may work more stable.

npm i ytdl-core

#