# STEP 1 - Check dependencies
To benefit from all the features of the script, you must purchase maps designated for the script , or add your hotel configuration.
Insert the SQL file to your database.
# STEP 5 - Setup Items and Images
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>`;
1- Add Items in ox_inventory/data/items.lua
QBCore:
['hotels_key'] = {
label = 'Hotel Key',
weight = 100,
},
ESX:
["hotels_key"] = {
label = "Hotel Key",
weight = 100,
stack = false,
close = true,
client = {
event = 'l2s-hotels:client:ToggleDoor',
},
},
2- Add Image in ox_inventory/web/images/...
1- Add Items in qb-core/shared/items.lua or or qs-inventory/config/metadata.js for esx
["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 qs-inventory/html/images/...
3-Add Item Info (optional) in qs-inventory/html/js/app.js
} else if (itemData.name == "hotels_key") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p>Hotel:<span>" +
itemData.info.hotel+
"<p>Room:<span>" +
itemData.info.room +
"</span>Key:</p><span>" +
itemData.info.cardnumber+ "</span></p>"
);
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 l2s-inventory/html/js/app.js
} else if (itemData.name == "hotels_key") {
$(".theiteminfo-title").html('<p>Room Access</p>')
$(".item-info-block-desc").html(
"</div></div> <div class='item-info-block-oneinfo'> <div class='item-info-block-oneinfo-title'>Hotel: </div> <div class='item-info-block-oneinfo-text'>" +
itemData.info.hotel +
"</div></div> <div class='item-info-block-oneinfo'> <div class='item-info-block-oneinfo-title'>Room Number: </div> <div class='item-info-block-oneinfo-text'>" +
itemData.info.room +
"</div></div> <div class='item-info-block-oneinfo'> <div class='item-info-block-oneinfo-title'>Card Number: </div> <div class='item-info-block-oneinfo-text'>" +
itemData.info.cardnumber +
"</div></div>"
);
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