⤵️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 - For (cfx_gn_von_hotel_rockford)
If you're using the GN Rockford Hotel map, navigate to the following directory:
📁 cfx_gn_von_hotel_rockford\script_loader\client
,
Then, add the following code to the last line of the file.
AddEventHandler('gn-studio:loadfloor', function(floor)
if floor == 1 then
loadEtage1()
elseif floor == 2 then
loadEtage2()
elseif floor == 3 then
loadEtage3()
elseif floor == 4 then
loadEtage4()
elseif floor == 5 then
loadEtage5()
elseif floor == 6 then
loadEtage6()
elseif floor == 7 then
loadEtage7()
end
end)
AddEventHandler('gn-studio:unLoad', function(floor)
UnloadIpl()
end)
And this line before any elevator therad:
Wait(2000)
if GetResourceState('l2s-hotels') ~= 'missing' then return end
# STEP 7 - Start The Script
1 - Start the script on your server.cfg
ensure l2s-hotels
Last updated