0Resmon
0Resmon
0Resmon
  • 0Resmon Documentation
  • What is FiveM Escrow ?
  • Open Source and Escrow
  • 0R Lib
  • 0R RESOURCES
    • 0R House Robbery
      • ⚠️Important
      • 📁Required Items
      • ⚙️Configuration
    • 0R Manageable Casino
      • Required Dependencies
      • Required Item
      • Required Job
      • Base Configuration
    • 0R HolsterAnim
      • OX Inventory
      • QB Inventory
    • 0R Drug Business
      • Installation
      • Configuration
    • 0R Multicharacterv2
      • Installation
      • Configuration
    • 0R ATM Robbery
      • Installation
      • Configuration
    • 0R HEIST
      • DUI
        • Installation
        • Configuration
        • Exports
      • Vangelico
        • Installation
        • Configuration
        • Exports
      • Pacific Bank
        • Installation
        • Configuration
        • Exports
    • 0R Garbage
      • Installation
      • Configuration
    • 0R Gungame
      • Installation
      • Configuration
      • Exports
    • 0R Paintball-v2
      • Installation
      • Configuration
      • Exports
    • 0R Hud V3
      • Installation
      • Configuration
      • Exports
      • Events
    • 0R Apartments - V2
      • Installation
      • Configuration
    • 0R PixelHouse
      • Installation
      • Configuration
      • Exports
      • DLC
    • 0R Caravan
      • Installation
      • Configuration
    • 0R Multicharacter
      • Installation
    • 0R Houses
      • Integrators and Exports
      • Installation
    • 0R Casino
    • 0R Motels
      • Installation
      • Configuration
    • 0R VIP System
      • Installation
      • Configuration
    • 0R IDCard
      • Installation
      • Configuration
    • 0R IDCard V2
      • Installation
    • 0R Pausemenu
      • Installation
    • 0R Studio
      • Installation
    • 0R Handcuff System
      • Installation Handcuff
    • 0R Easy Time
      • 0R Easytime
    • 0R Lockpick
      • Installation
    • 0R Target
      • Installation
    • 0R Textui
      • Installation
    • 0R Fishing
    • 0R Carplay
    • 0R Hacking Mini Game
  • S4 Resources
    • ILLEGAL CARAVAN
      • Adaptations
    • s4-time
      • First Install
      • Exports
      • Config Var's
    • Illegal Phone
      • Installing, Faq & Features
      • Voice Script Adaptation
      • Other Phone Integrations
      • Task's - Location Messages
      • Data sharing
    • Breathalyser
      • API
    • Res Audio
      • Installation
      • Configuration
    • S4 Housing (BETA)
      • Claim
      • Installation
      • Permissions
      • Add House
      • Adaptation (Wardrobe)
      • Adaptation (Stash)
      • Adaptation (Garage)
    • S4 House
      • Installation
    • S4 Report System V2
      • Installation
      • Why videos not uploading?
    • S4 Health System V2
      • Installation
      • Adapting Custom Ambulance Job
      • Bleeding Adjustment
      • How To Add Custom Items
      • Required Items
    • pizza
    • s4-adminmenu
      • First Install
      • Adaptations
      • Video Recording Adaptation
  • KIBRA RESOURCES
    • Kibra Mechanics
      • Installation
      • Configuration
    • Kibra SmartPad
      • Installation
      • Configuration
    • Kibra Vehicleshops
      • Installation
      • Configuration
    • Kibra Core
      • Installation
    • Kibra Dispatch
      • Installation
      • Exports And Configure
  • BP RESOURCES
    • BP MAPUI
      • Config Settings
      • Exports, Events
      • Test Command
    • BP DRONE
      • Config Settings
    • BP INVENTORY
      • 🧠Installation
      • 🪶Config Settings
        • 🪁Config_items.lua settings
        • 🚕Config_vehicle.lua settings
      • ⚔️Export and Events
      • 👕Clothing Settings
      • 🏹Weapon settings
    • 👕BP CLOTHING V4
      • 🧠Installation-c
      • 🪶Config Settings
        • 🎓Char Create Config
        • 🎓Clothing Store Config
        • 🎓Barber Store Config
        • 🎓Tattoo Store Config
      • ⚔️Export and Events
      • 🤪Character creation settings
    • BP GARAGE
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Export and Events
      • ❓What is JSON files
      • 🖱️Commands
  • FRKN Resources
    • Frkn Racing
      • 🧠Installation
      • ⚔️Features Overview
      • 🪶Config Settings
      • 🏆Items
    • Frkn Camera System
      • 🧠Installation
      • ⚔️Usage
      • 🪶Config Settings
      • 🏆Items
    • Frkn Tuning System
      • 🧠Installation
      • ⚔️Usage
      • 🪶Config Settings
      • 🏆Items
    • Frkn Doorlock V2
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Commands
    • ⛪Frkn Bank Heist
      • Installation
      • 🛠️Config Information
      • Script Usage
    • 🎭Frkn Hack System
      • Installation
      • Config Information
      • 🛠️PH Panel Introduction
        • 💰PH Robbery Contracts
        • 📜PH Hire Contracts
        • 🙅‍♂️PH Group Members
        • 📢PH Announcements
      • 🔓Crack App Introduction
      • 🛜Salty App Introduction
      • 🕶️Dark Store App Introduction
      • ⛏️Miner App Introduction
      • 🔗Miner Extension App Introduction
      • 🚁Drone App Introduction
      • 💳Wallet App Introduction
      • 🗒️Note App Introduction
      • 🏦Bank Heist
    • Frkn Minigame Pack
      • Riddle Minigame
      • Xox Minigame
      • Stick Minigame
      • Letter Minigame
    • Lab Pet V3
      • 🧠Installation
      • 🪶Config Settings
      • ⏸️Usage Description
    • Frkn Money Washing
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Commands
      • 🏆Items
    • Frkn Deathscreen V3
      • 🧠Installation
      • 🪶Config Settings
    • Frkn Doorlock
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Commands
    • Frkn DrawText
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Export and Events
    • Frkn Fuel Station V4
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Export and Events
    • Frkn Death Screen V2
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Export and Events
    • Frkn Craft V2
      • 🧠Installation
      • 🪶Config Settings
      • ⚔️Export and Events
  • Wais Resoucres
    • ⚒️Wais Jobpack
      • ⚙️How to set it up
      • 🎛️Framework settings
      • 🗂️Install Jobs / Items
      • 🪚Job Settings
        • 🍕Pizza Delivery
        • 🗞️News Delivery
        • 🌭Mobile Hotdog
        • 🦺Forklifter
        • ☘️Gardener
        • 🚚Trucker
        • ⚒️Roadhelper
        • 🚌Bus Driver
        • 🔥Fire Department
        • 🦅Hunting
        • 👨‍🦯Detectorist
        • 🚗Project Car
        • 🤿Diver
        • 🧑‍🌾Farmer
        • 👨‍🔧Electrician
      • ❓FAQ / Errors / Questions
      • ❓Error: syntax error near '<\1>'
      • ❓How To Do
    • 🎹Wais Studio
      • 🔌Installation
        • 🔑Create API Key
        • 🎛️Framework settings
        • 📹Streaming Settings
      • 🎶Create, Settings Studio
      • ❓FAQ / Errors
      • 📚Handbook
    • 🎭Wais Club
      • ⚙️How to set it up
      • 🎛️Framework settings
      • 🔮Add / Edit Club Things
      • 🔦Spotlight Creator
      • 💃Npc Creator
      • 🔐YouTube API Stuff
      • ❓FAQ / Errors / Questions
      • ❓Error: syntax error near '<\1>'
    • Wais Multicharacterv2
      • ⚙️How to set it up
      • 📒Installation ESX
      • 🔮Installation QBCore
        • 💡Old QBCore Adapt
        • 💡New QBCore Adapt
      • ✨Installation Qbx
        • 💡Integration Qbx_core
      • 🏡Apartment Integration
      • 🔄Bringing old characters
      • 📜Starer Items
      • 🔑Slot Actions
      • 🔐Discord Authenticator
      • 🛒Tebex Authenticator
      • 🌏Spawnselector / Spawn
      • 📦Hide / Open Another UI'S
      • 📋Change Language
      • ❓Kicked For Explotation
    • Wais Bodycamv2
      • ⚙️How to set it up
      • 🎛️Installation Items
      • 🌟Adapt Framework
      • 🙋‍♂️Add Job
      • 🗺️Badge Things
      • 📸Screen Recording
      • 📷Prop System
      • 📃Change Language
      • ❓How to?
    • Wais Evidence
      • ⚙️How to set it up
      • 🔩Installation Items
      • 🏓Adapt Framework
      • 🔫Weapon Things
      • 👮Add Job
      • 📋Change Language
      • 🎯Errors / Questions
    • Wais Hudv5
    • Wais Rhud
  • Stache Resources
    • Stache Phone
      • 📱Installations
      • ⚙️Configuration
      • 🛠️Custom App
      • 📖S.S.S.
  • GENIUN RESOURCES
    • 0R Clothing
      • ⚙️Installation
      • 🛠️Configration
      • 🧰Exports & Callbacks
      • 📸How to take photos of clothes?
Powered by GitBook
On this page
  • Supported Inventories
  • ESX
  • QBOX
  • QBOX Starter Apartment ?
  • QBCore
  • QBCore QB-Apartment ?
  • What You Need to Know
  1. 0R RESOURCES
  2. 0R Apartments - V2

Installation

0Resmon Apartment Installation Document and Basic Concepts

  • Once you have set up the dependencies, all you have to do is upload the folder to the server.

This installation guide covers both ESX and QBCore/QBOX frameworks.

Resource
Source

ox_lib

object_gizmo

0r_lib

Download From Your Keymaster

Maps

Download From Your Keymaster

Supported Inventories

  • qb-inventory

  • ox_inventory

ESX

start es_extended
start 0r_lib
start 0r-apartment-v2
--- esx resources --

QBOX

--[[ Other Scripts ]]
start 0r_lib
start 0r-apartment-v2

QBOX Starter Apartment ?

  • Q: I want new players to choose an apartment and have a random room, what should I do?

  • A: First of all, you should be using qbx_spawn for this. After this you won't need qbox_apartment. However, it is your responsibility to make sure that other scripts that use it don't malfunction. The functions have been edited to replace qbx_apartments. So if you use other scripts, you should fix them according to your settings. Here is what you need to do in order:

1- 0r-apartment-v2\modules\bridge\qb\client.lua If you are already using the latest update, you do not need to !

Line 24~ apartments:client:setupSpawnUI

RegisterNetEvent("apartments:client:setupSpawnUI", function(cData, firstSpawn, isNew)
    if not cData then return end
    if Utils.Functions.IsResourceStart('qbx_core') then
        local Locations = Config.Apartments

        local upLocations = {}

        for key, value in pairs(Locations) do
            upLocations[#upLocations + 1] = {
                label = value.label,
                coords = value.coords.enter,
                propertyId = key,
            }
        end

        TriggerEvent("qb-spawn:client:setupSpawns", cData, true, upLocations)
    else
        Client.Functions.TriggerServerCallback("0r-apartment:Server:GetPlayerRooms", function(result)
            if #result > 0 then
                TriggerEvent("qb-spawn:client:setupSpawns", cData, false, nil)
                TriggerEvent("qb-spawn:client:openUI", true)
            else
                if isNew and Config.ApartmentStarting then
                    local Locations = Config.Apartments
                    TriggerEvent("qb-spawn:client:setupSpawns", cData, true, Locations)
                    TriggerEvent("qb-spawn:client:openUI", true)
                else
                    TriggerEvent("qb-spawn:client:setupSpawns", cData, false, nil)
                    TriggerEvent("qb-spawn:client:openUI", true)
                end
            end
        end, cData.citizenid or cData.cid)
    end
end)

2- qbx_spawn\client\main.lua Line 188~ inputHandler & qb-spawn:client:setupSpawns Update:

local function inputHandler()
    while DoesCamExist(previewCam) do
        if IsControlJustReleased(0, 188) then
            previousButtonID = currentButtonID
            currentButtonID -= 1

            if currentButtonID < 1 then
                currentButtonID = #spawns
            end

            updateScaleform()
        elseif IsControlJustReleased(0, 187) then
            previousButtonID = currentButtonID
            currentButtonID += 1

            if currentButtonID > #spawns then
                currentButtonID = 1
            end

            updateScaleform()
        elseif IsControlJustReleased(0, 191) then
            DoScreenFadeOut(1000)

            while not IsScreenFadedOut() do
                Wait(0)
            end

            TriggerServerEvent('QBCore:Server:OnPlayerLoaded')
            TriggerEvent('QBCore:Client:OnPlayerLoaded')
            FreezeEntityPosition(cache.ped, false)
            DisplayRadar(true)

            local spawnData = spawns[currentButtonID]
            if spawnData.propertyId then
				if GetResourceState('0r-apartment-v2') == 'started' then
					TriggerServerEvent("apartments:server:CreateApartment", spawnData.propertyId, spawnData.label)
				else
					TriggerServerEvent('qbx_properties:server:enterProperty', { id = spawnData.propertyId, isSpawn = true })
				end
            else
                SetEntityCoords(cache.ped, spawnData.coords.x, spawnData.coords.y, spawnData.coords.z, false, false, false, false)
                SetEntityHeading(cache.ped, spawnData.coords.w or 0.0)
            end

            DoScreenFadeIn(1000)

            break
        end

        Wait(0)
    end

    stopCamera()
end

AddEventHandler('qb-spawn:client:setupSpawns', function(cData, useExtra, extraLocations)
    spawns = {}

	if not useExtra then

		local lastCoords, lastPropertyId = lib.callback.await('qbx_spawn:server:getLastLocation')
		spawns[#spawns + 1] = {
			label = locale('last_location'),
			coords = lastCoords,
			propertyId = lastPropertyId
		}

		for i = 1, #config.spawns do
			spawns[#spawns + 1] = config.spawns[i]
		end

		local properties = lib.callback.await('qbx_spawn:server:getProperties')
		for i = 1, #properties do
			spawns[#spawns + 1] = properties[i]
		end

	else
	
		spawns = extraLocations

	end

    Wait(400)

    managePlayer()
    setupCamera()
    setupMap()

    Wait(400)

    currentButtonID = 1
    scaleformDetails(currentButtonID)
    inputHandler()
end)

3- qbx_core/client/charecter.lua Line~345

-- if GetResourceState('qbx_spawn') == 'missing' then
--     spawnDefault()
-- else
--     if config.characters.startingApartment then
--         TriggerEvent('apartments:client:setupSpawnUI', newData)
--     else
--         TriggerEvent('qbx_core:client:spawnNoApartments')
--     end
-- end

TriggerEvent('apartments:client:setupSpawnUI', newData)

Find and Update like that

QBCore

start qb-core
start 0r_lib
start 0r-apartment-v2
--- qbcore resources --

QBCore QB-Apartment ?

  • Q: I want new players to choose an apartment and have a random room, what should I do?

  • A: First of all, you should be using qb-spawn and qb-multicharacter and qb-apartments for this. After this you won't need qb-apartments. However, it is your responsibility to make sure that other scripts that use it don't malfunction. The functions have been edited to replace qb-apartments. So if you use other scripts, you should fix them according to your settings. Here is what you need to do in order:

1- In qb-multicharacter: server/main.lua replace this code block:

RegisterNetEvent('qb-multicharacter:server:createCharacter', function(data)
    local src = source
    local newData = {}
    newData.cid = data.cid
    newData.charinfo = data
    if QBCore.Player.Login(src, false, newData) then
        repeat
            Wait(10)
        until hasDonePreloading[src]
        if GetResourceState('0r-apartment-v2') == 'started' then -- > This place has changed !
            local randbucket = (GetPlayerPed(src) .. math.random(1,999))
            SetPlayerRoutingBucket(src, randbucket)
            print('^2[qb-core]^7 '..GetPlayerName(src)..' has successfully loaded!')
            QBCore.Commands.Refresh(src)
            loadHouseData(src)
            TriggerClientEvent("qb-multicharacter:client:closeNUI", src)
            TriggerClientEvent('apartments:client:setupSpawnUI', src, newData, true, true) -- > This place has changed !
            GiveStarterItems(src)
        else
            print('^2[qb-core]^7 '..GetPlayerName(src)..' has successfully loaded!')
            QBCore.Commands.Refresh(src)
            loadHouseData(src)
            TriggerClientEvent("qb-multicharacter:client:closeNUIdefault", src)
            GiveStarterItems(src)
        end
    end
end)

2- In qb-spawn/fxmanifest: replace shared_scripts with the following.

shared_scripts {
    '@qb-core/shared/locale.lua',
    'locales/en.lua',
    'locales/*.lua',
    'config.lua',
    --'@qb-apartments/config.lua',
    "@0r-apartment-v2/shared/config.lua",
}

3- qb-spawn/client.lua

local Apartments = Config.Apartments -- You should add this at the top.

You must change all Apartments.Locations definitions in the file to Apartments.

For example: client line 136.

TriggerServerEvent("apartments:server:CreateApartment", appaYeet, Apartments.Locations[appaYeet].label) Instead 
> to
TriggerServerEvent("apartments:server:CreateApartment", appaYeet, Apartments[appaYeet].label)
-- As you can see, instead of `Apartments.Locations` I wrote `Apartments`

4- qb-spawn/client.lua line 135 / function RegisterNUICallback('chooseAppa', function(data, cb)

    local appaYeet = tonumber(data.appType) or data.appType
	if type(appaYeet) == "number" then
		appaYeet = appaYeet + 1
	end

Then restart your server. Everything should work properly. Please don't create a support ticket until you are sure everything is working properly.

What You Need to Know

  • Q: Where is the sql file ?

  • A: database.sql

  • Q: How to add a motel ?

  • A: You can take an example from Config.Apartments in the Config file.

Previous0R Apartments - V2NextConfiguration

Last updated 3 months ago

Download
Download