⤵️Installation

# STEP 1 - Check dependencies

Make sure you have installed all dependencies .

# STEP 2 - Drag And Drop

Drag and drop the l2s-hotels to your resources folder.

# STEP 3 - Setup Maps

To benefit from all the features of the script, you must purchase maps designated for the script , or add your hotel configuration.

# STEP 4 - SQL Insert

Insert the SQL file to your database.

# STEP 5 - Setup Items and Images

Set Up Items According to your inventory

1- Add Items in qb-core/shared/items.lua

    ["hotels_key"] = { 
        ["name"] = "hotels_key",
        ["label"] = "Room Access",
        ["weight"] = 100, 
        ["type"] = "item",
        ["image"] = "hotels_key.png",
        ["unique"] = true,
        ["useable"] = true,
        ["shouldClose"] = false,
        ["combinable"] = nil,
        ["description"] = "Hotel Room Access" 
    },

2- Add Image in qb-inventory/html/images/...

3-Add Item Info (optional) in qb-inventory/html/js/app.js

case "hotels_key":
    return `<p><strong>Room: </strong><span>${itemData.info.room}</span></p>
    <p><strong>Hotel: </strong><span>${itemData.info.hotel}</span></p>
    <p><strong>Serial Number: </strong><span>${itemData.info.cardnumber}</span></p>`;

Important: if you use ox_inventory , you should add this code in : ox_inventory/modules/inventory/server.lua

exports('RegisteredStashes', function()
	return RegisteredStashes
end)

exports('RemoveRegisteredStash', function(stash)
	exports.ox_inventory:ClearInventory(stash)
	MySQL.update.await('DELETE FROM ox_inventory WHERE name = ?', { stash })
	RegisteredStashes[stash] = nil
end)

# STEP 6 - Start The Script

1 - Start the script on your server.cfg

ensure l2s-hotels

Last updated