DOCUMENTATION
  • 🌐INTRODUCTION
  • â„šī¸INFORMATION
  • 💲PAID SCRIPTS
    • 🎧Surround (Spatial Audio)
      • Introduction
      • Installation
      • API
        • Client
          • Set
          • Get
          • Handlers
        • Server
          • Set
          • Get
        • Shared
      • Examples
    • 🏨Motels
      • Introduction
        • Motel Manager
        • Customer
        • Rent Cycle
        • Share Key
        • Auto System
        • Admin
        • Logs
        • Configurable Codes
        • Optimization
      • Installation
  • 🆓FREE SCRIPTS
    • FiveM Manager Bot
      • INSTALLATION
Powered by GitBook
On this page

Was this helpful?

  1. PAID SCRIPTS
  2. Motels

Installation

How do I install?

PreviousOptimizationNextFREE SCRIPTS

Last updated 1 year ago

Was this helpful?

With the 4.0, the motel is now automatically adapting to your server.
But you need to make some minor changes.

If you are using motel for the first time, don't install sql immediately. Motel makes automatically create tables. Just check for errors on cmd.

Stash

First of all, the stash items are not dependent on the players. It depends on the rooms. So if a player leaves the room, room's items are not deleted.

You can turn this off by setting personalStashes to false

  • There are four inventory supported by the motel. If you are not using one of these, you can use the motel's inventory

  • If you don't change the Config.stashSettings. Stashes is automatically changed by the motel.

If you are using qs-inventory you don't need to change anything.

This is a menu based inventory.

So, it doesn't need an inventory hud. If you have an unsupported inventory, don't worry! I have something good for you.

Limit

You can specify a stash limit.

mx-motels/shared/config.lua

inventoryLimit = 100 -- How much inventory space will the motel have? [just for standalone inventory]

There are two things you need to do

  • Add the item you used on Config.metaitem to your item list. 
    By default it's motelkey.
  • Change the Config.stashSettings. You can get reference below.

References

Items

Add your item to qb-core > shared.lua

["motelkey"] = {
    ["name"] = "motelkey",
    ["label"] = "Motel Key",
    ["weight"] = 0,
    ["type"] = "item",
    ["image"] = "motelkey.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = "Motel Key"
},

Stash Config

mx-motels > shared > config.lua

stashSettings = {
    maxweight = 4000000,
    slots = 500,
},

OPTIONAL

You don't have to do this. 
If you do, it will show the room number in the item information.

Go to qb-inventory > html > js > app.js

Function Name: FormatItemInfo

}else if (itemData.name == 'motelkey') {
    $(".item-info-title").html('<p>'+itemData.label+'</p>');
    $(".item-info-description").html('<p>Motel Key: ' + itemData.info.motel + '</p>');

Same with the qb-inventory, two things.

  • Add the item you used on Config.metaitem to your item list. 
    By default it's motelkey.
  • Change the Config.stashSettings. You can get reference below.

References

Items

Add your item to ox_inventory > data > items.lua

['motelkey'] = {
    label = 'Motel Key',
    weight = 0.250,
    stack = true,
    close = true,
    client = {export = 'mx-motels.mx-motels:UseKey'}
},

Stash Config

mx-motels > shared > config.lua

stashSettings = {
    maxweight = 4000000,
    slots = 500,
},

Just one thing.

Change the Config.stashSettings. You can get reference below.

References

mx-motels > shared > config.lua

stashSettings = {
    slots = 80,
    weight = 50
},

💲
🏨
Cmd should look like this