codeReal Documentation
  • 👋Welcome to codeReal Documentation
  • Normal Series
    • 🏦Bank
      • ⬇️Installation
      • ℹ️Information
      • 🛠️Exports
    • 👮Dispatch
      • ⬇️Installation
      • ℹ️Information
      • 🛠️Exports
    • 🏠House
      • ⬇️Installation
      • ℹ️Information
  • Aqua Series
    • 🚘Vehicleshop
      • ⬇️Installation
      • ⚙️Configuration
      • ℹ️Information
Powered by GitBook
On this page
  • Step 1 - Download And Drag
  • Step 2 - Insert SQL File
  • Step 3 - Config Configuration
  • Step 4 - Edit SQL Table
  • Step 5 - Inventory Configuration
  • qb-inventory:
  • ox_inventory:
  • Step 6 - Discord Configuration
  1. Normal Series
  2. House

Installation

Installation of this resource

Step 1 - Download And Drag

Download the file from keymaster and drag the file into your resources folder.

Step 2 - Insert SQL File

Insert the SQL file in the folder to your database

Step 3 - Config Configuration

Edit this part according to your own needs.

config/config.lua
Config = {}
CodeReal = {}

Config.Framework = 'newesx' -- newesx, oldesx, newqb, oldqb
Config.MySQL = 'oxmysql' -- oxmysql, ghamattimysql, mysql-async | Don't forget to edit fxmanifest.lua

Config.AllowToBuyMoreThanOne = true -- If true, players can buy more than 1 house.
Config.GiveRentSystem = true -- If you want to enable a system where players can rent houses to each other, set this true.
Config.RentTime = 7 -- Days | The time period initially given when the player rents the house
Config.SendMailToPlayer = false -- If true, it sends an email to the player's phone if the player's lease has expired. | If you set 'true', then you need to edit config/server_config.lua
CodeReal.Bill = 'SwedenEstate' -- You can change it however you like, but only use English characters to avoid problems!
Config.SellHouseRatio = 2 -- 2 => 50% | Since 2 is written here, if the player sells the house, system will divide the normal price of the house by 2 and give it to the player.
Config.CopyKeyPrice = 100 -- The fee for copying the key to the house.
Config.AddDayPrice = 100 -- If 100, when player want to extend rent time, 1 day = 100$

Config.GiveVehicleKeys = true -- A system of giving keys to the player after taking cars out from the garage
Config.VehicleKeySystem = 'qb-vehiclekeys' -- qb-vehiclekeys, qs-vehiclekeys, wasabi-carlock, cd_garage, custom | If you choose 'custom' you need to edit config/client_config.lua

Config.CheckVehicleOwner = true -- If there is a friend of the house and this option is true, then when a player takes the car out of the garage, system checks whether the car belongs to the person who tried to take it out. But if it is false, it takes the car out of the garage directly.

Config.WardrobeSystem = 'qb-clothing' -- qb-clothing, fivem-appearance, illenium-appearance, esx_skin, custom | If you choose 'custom' you need to edit config/client_config.lua

Config.InventorySystem = 'ox_inventory' -- qb-inventory, ox_inventory
Config.HouseStashSlot = 50 -- Stash slot amount
Config.HouseStashWeight = 250 -- Stash weight limit

Config.CheckRentStatus = { -- Check time for rented houses. For example, if you write 00:00 here, it will check every day at 00:00.
    Hour = 00,
    Minute = 42
}

Config.Notification = function(msg, type, server, src)
    if server then
        if Config.Framework == 'newqb' or Config.Framework == 'oldqb' then
            TriggerClientEvent('QBCore:Notify', src, msg, type, 4000)
        else
            TriggerClientEvent('esx:showNotification', src, msg)
        end
    else
        if Config.Framework == 'newqb' or Config.Framework == 'oldqb' then
            TriggerEvent('QBCore:Notify', msg, type, 4000)
        else
            TriggerEvent('esx:showNotification', msg)
        end
    end
end

Step 4 - Edit SQL Table

For the garage system to work correctly, add the two rows in you see in on the screenshot to the player_vehicles table. If you are using ESX you will do the same but in the owner_vehicles table.

Step 5 - Inventory Configuration

Add the code given at the bottom according to the inventory you are using.

qb-inventory:

qb-core/shared/items.lua
['housekeys']                       = {['name'] = 'housekeys',                         ['label'] = 'House Keys',                 ['weight'] = 50,         ['type'] = 'item',         ['image'] = 'housekeys.png',             ['unique'] = true,         ['useable'] = true,     ['shouldClose'] = true,   ['combinable'] = nil,   ['description'] = 'Seems like house keys...'},
qb-inventory/html/js/app.js
} else if (itemData.name == "housekeys") {
    $(".item-info-title").html('<p>'+itemData.label+'</p>')
    $(".item-info-description").html('<p><strong></strong><span>House NO: ' + itemData.info.house + '</span></p>');

ox_inventory:

ox_inventory/data/items.lua
 ['housekeys'] = {
     label = 'House Keys',
     weight = 1,
     consume = 0,
     stack = false,
     close = true,
     server = {
         export = 'real-house.housekeys'
     }
},

Step 6 - Discord Configuration

Go to config/server_config.lua and paste your discord bot token for profile picture.

If you don't know how to create a discord bot token, you can watch the video below:

PreviousHouseNextInformation

Last updated 10 months ago

🏠
⬇️
https://www.youtube.com/watch?v=zrNloK9b1ro