Installation
0Resmon Motels Installation Document and Basic Concepts
This installation guide covers both ESX and QBCore frameworks.
What is required for installation
0r_lib (You can find it on your Keymaster.)
Map Files (You can find it script files)
Supported Inventories
qb-inventory
qs-inventory
ox_inventory
ps-inventory
lj-inventory
origen_inventory
ls-inventory
core-inventory
Apartment System Installation
Apartment system, when players register to the server, they automatically start the server in the hotel room. To achieve this, we need to make a few changes.
First, change Config.Apartment = true in the config.lua file.
esx_multicharacter Setup
Open the esx_multicharacter/client/main.lua file and then, as you see in the photo, you should leave a space after line 271 and place the triggerevent that allows giving a Random Room.
The code sample is available below the photo.
qb-multicharacter Setup
First you must disable qb-apartments.
What you need to do here is; Open the qb-multicharacter/client/main.lua file and find the qb-multicharacter:client:closeNUIdefault event starting at line 100. And update as below.
Code You Need to Add:
What we need to do in the same way here is; Open the qb-multicharacter/server/main.lua file and find the qb-multicharacter:server:createCharacter event starting at line 116 and add the following code with a space after line 124.
Using a different multi-character?
If you are using a different multi-character, you need to place the event in the server or client event where the player is registered to integrate it. I leave a small explanation.
You must add this code to the new section of the player's character. Each multicharacter has a default spawn point. You must cancel these spawn points.
We have an export for this, exports["0r_motels"]:GetApartment()
. Thanks to this export, you can check whether the Apartment system is active or not. If Config.Apartment
is true, you must cancel the default spawn points of your multicharacter.
Setup for Ox Inventory
Open the ox_inventory/data/items.lua file. And place the following code.
and now open the ox_inventory/modules/items/client.lua file and place the following code.
Setup for QS, LJ, Origen, PS, QB Inventories
The best thing about these inventories is that their infrastructure is qb-inventory. That's why the installations are the same.
Place these items in items.lua in your inventories. (qb-inventory to qb-core/shared/items.lua)
Open your inventory javascript file. And search for the FormatItemInfo function and place this code in the if loop within that function. There should be a metadata.js file in qs-inventory, do the same process there.
For New qb-inventory
for codem-inventory (in metadata.js)
server.cfg
The server.cfg initialization order should be as follows.
If you are going to use an apartment system, pay attention to the server.cfg sequence. The motel system must be initialized before your multicharacter script.
ESX
QBCore
What You Need to Know
Last updated