L2S Documentation
DiscordTebex
  • Documentation
  • Information
    • Discord Roles
    • How to update your asset
    • FiveM Asset Escrow System
  • Coding Information
    • Webhook System
    • Register Key Mapping
    • Translation System
  • ASSETS & GUIDES
    • 🚨Dispatch
      • ⤵️Installation
      • ⚙️Configuration
        • Settings
        • API
        • Hub
        • CCTV
        • Dispatch
        • UI
      • 💻Integration
        • Exports
          • Client
          • Server
        • Police Alerts
        • Radio Channel
        • Duty System
    • 🏨Hotels V2
      • ⤵️Installation
      • ⚙️Configuration
        • Config
        • Elevators
        • Hotels
      • 💻Exports
    • 👮Police Hub
      • ⤵️Installation
      • ⚙️Configuration
      • 💻Events & Alerts
    • 💀Gangs Turf
      • ⤵️Installation
      • ⚙️Configuration
        • Settings
        • Gangs
      • 💻Exports
      • 📚Tutorial
    • 🔫Paint Ball
      • ⤵️Installation
      • ⚙️Configuration
        • Settings
        • Clothes
        • Locations
      • 💻Exports
Powered by GitBook
On this page
  • # STEP 1 - Check dependencies
  • # STEP 2 - Drag And Drop
  • # STEP 3 - Setup Maps
  • # STEP 4 - SQL Insert
  • # STEP 5 - Setup Items and Images
  • # STEP 6 - For (cfx_gn_von_hotel_rockford)
  • # STEP 7 - Start The Script
  1. ASSETS & GUIDES
  2. Hotels V2

Installation

PreviousHotels V2NextConfiguration

Last updated 5 months ago

# STEP 1 - Check dependencies

Make sure you have installed all .

# 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>`;

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/config/metadata.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>"
            );   

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)

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

If you're using the GN Rockford Hotel map, navigate to the following directory: cfx_gn_von_hotel_rockford\script_loader\client,

🏨
⤵️
📁
dependencies
NE NOORE | WIWANG Hotel v2
G&N's Studio | Subscription
17KB
hotels_key.zip
archive
17KB
hotels_key.zip
archive
17KB
hotels_key.zip
archive
17KB
hotels_key.zip
archive
Logo
Logo