[PAID] [QBCore] Infinity Motels by KOKOROG

809d59f7ab2d3a05035de84c853bd50dd29bd9a1

You can buy it on Tebex - Just 20 Euro

This resource is encrypted with FiveM escrow (Open Source is avaliable)

After purchase you can access the script at https://keymaster.fivem.net/asset-grants

Preview Video

Features

Fully customizable resource using metadata and QBCore based framework

2 languages - English and Bulgarian

Missed invoices system

Remove room on specific number of missed invoices

Item key

Lockable stashes

Easy adding rooms from the config and easy inserting them in database with command /newmotelroom (Admin only)

Players can see room numbers with /showrooms

Easy translation from lang.lua

Easy UI translation from index.js (requeries some experience)

Own config for every motel like picture background, name, first tax price and others

Resmon is 0.3 - 0.7 on normal use and only when you activate /showrooms it goes to 0.20 because of the DrawText3D

Dependencies

QBCore based framework (you can change to your core from config.lua like qb-, IF- or the way your core is named) - IT HAVE TO BE A QBCore BASED OR SMILLAR

Motel Map Pinkcage

Motor Motel Map

Any notification resource (you can edit it from config) - i personaly use okok

Any draw text ui script (you can edit it from config) - i personaly use okok

For metadata can work you need qb-inventory or fork of it

For sounds you need interact-sound - If yours dont work try mine - here

Updates

Discord WebHook - coming soon

Logs stash before removing - coming soon

Logs time in database - coming soon

24 hour system - coming soon

The Config.lua


Config = {}
Config.Locale = "bg" -- select from en/bg -- you can find them in lang.lua and if you want translate them
-- i recommend to dont change many things to keep the script balanced :)
Config.CorePrefix = 'qb-'
function ShowNotification(msg, type)
    exports['okokNotify']:Alert("Motel", msg, 5000, type) 
    -- you can change that to your own CLIENT SIDE
end
function ShowNotificationServer(source, msg, type)
    TriggerClientEvent('okokNotify:Alert', source, "Motel", msg, 5000, type)
    -- you can change that to your own SERVER SIDE
end
-- used types are info, warning, success, error


function DrawUI(text)
    exports['okokTextUI']:Open(text, 'darkblue', 'left')
    -- you can change that to your own CLIENT SIDE
end
function CloseUI()
    exports['okokTextUI']:Close() 
    -- you can change that to your own CLIENT SIDE
end




Config.SaveInventoryStashName = "Room"
-- The name you type here is the title of the hotel warehouses.
Config.BillingTime = 1*60000 
-- Billing time
-- 20*60000 = 20 minutes -- 60000 = 1 minute
-- Best is around 20 minutes so a players cant leave after like every hour to miss payments
Config.AutomaticCashOut = true
-- If true, it automatically withdraws the rent directly from the player's bank. If it is wrong, it will be issued as an invoice. (Best is to use it as default)
Config.MultiMotel = true 
-- Allows players to rent multiple motel rooms.
Config.MotelBillAmount = 50 
-- Motel Room Rental Fee -- The one that charges player after every Config.BillingTime
Config.MaxInvoices = 3
-- Maximum possible missed invoices
Config.InvoiceNotify = 2
-- This makes a notification for room cancel when the number of invoices is reached 
-- best if your MaxInvoices is like 3 to set it to 2 when player reach 2 invoices it will receive
-- notify that have to pay next bill or room will be gone
Config.MotelRoomForeclosure = true
-- If a player who rents a motel room does not have enough rental fees in his bank account, the hotel room will be cancelled.
Config.Phone = true 
-- If you are using the QB Phone resource, mark it as true. For Billing.
Config.MotelsBlipAlwaysOpen = true
-- The motels keeps its Blips on at all times.
Config.MetaData = true
--  When a motel room is rented, a special key is given to that motel room. And people using this key can enter the rented room and gain access to the warehouse. If you mark it as false, each player will only be able to enter the room they rented.
Config.UIDrawText = true
-- If you mark it as true, the DrawText function is used. If you mark it as false, the UI DrawText will be used and optimized.
Config.MotelKeyItemName = "motelkey"
-- If the metadata is true, this may be useful for you.
Config.RoomNoDrawTextCommand = "showrooms" 
-- When this command is used, the number of hotel rooms becomes visible to all players from the specified distance level.
Config.NewRoomAddCommand = "newmotelroom"
-- Command that allows you to add a new motel room to the database.
Config.StashAccessEveryone = false
-- This property will work if the metadata property is set to false. In this case, if marked as true, anyone can do the Storage Check of the Room. However, if false, only the room owner can do this.
Config.MotelRoomRentBuyType = "cash" -- "cash" or "bank"
Config.CopyRoomKeyPrice = 50 
-- A fee to issue a new key if you lose your motel room key.
Config.Wardrobe = {
    EventType = "client", -- client or server
    EventName = "qb-clothing:outfitsMenu", -- Clothing Menu Event Name
}
-- UI Controls 
Config.UIControls = {
    StashLockControl = "[E] ",
    DoorLockOpenControl = "[E] ",
    StashOpenControl = "[G] ",
    OpenReceptionControl = "[E] ",
    WardrobeOpenControl = "[E] "
}
-- Controls
Config.StashLockControl = 38 -- Motel Stash Lock Control
Config.DoorLockControl = 38 -- Motel Door Lock Kontrol
Config.StashOpenControl = 47 -- Motel Stash Open Control
Config.OpenReceptionControl = 38 -- Reception Menu Open Control
Config.WardrobeOpenControl = 38
-- Markers
Config.WardMark = 20 -- Wardrobe marker
Config.ReceptMark = 20 -- Reception marker
-- Sounds
Config.DoorOpen = "DoorOpen" -- sound when opening door
Config.DoorClose = "DoorClose" -- sound when closing door
Config.WardSound = "Clothes1" -- sound when entering clothes menu
Config.StashOpen = "StashOpen" -- sound on opening and closing the stash




Config.Motels = {
    {        
        MotelName = "Pinkcage Motel", -- Motel Name
        MotelSocietyName = "PNKCGMTL", -- Motel Socienty / used for phone invoices
        Background = "img/pinkcage1.png", -- Reception background image.
        Show = false, -- If that is true a photo as background will be displayed / if its false a colorful moving background will be displayed
        MotelMainCoord = vector4(324.49, -211.29, 54.09, 324.03), -- Motel Blip Coord
        MotelBlip = {Id = 475, Color = 1, Scale = 0.6},
        MotelBlipOpen = true, --  If true, Motel Blip is activated.
        MotelDistance = 10.0, -- distance for showing the door numbers when using /showrooms
        MotelDoorDistance = 1.5, -- The distance value of the players to the door
        ReceptionCoord = vector4(324.84, -230.11, 54.22, 328.19), -- Reception Location Vector4()
        Payment = true, -- If it is true, an invoice will be issued for the room rented by the players at certain time intervals.
        MarkerColor = {r = 57, g = 125, b = 199, a = 0.9}, -- Marker color adjustment available at the reception.
        RoomPrice = 100, -- Motel Room Rent Price / The first tax
        InvoiceAmount = 50, -- a invoice amount if you use phone invoices
        Wardrobe = true, -- If true, motel rooms have wardrobes.
        MotelDoors = {
            -- Motel Rooms Available. You can add a new hotel room to this list.
            -- (Note: For a new hotel room you add here, you need to add a new column to the infinity_motels table in the database. Easy with /newmotelroom)
           {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(307.06, -212.96, 54.25, 89.29), -- Coordinate of the door in the room
                StashCoord = vector4(307.18, -208.02, 53.77, 61.15), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(302.68, -206.8, 54.23, 328.76) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(311.24, -203.26, 54.22, 341.41), -- Coordinate of the door in the room
                StashCoord = vector4(310.72, -198.78, 54.23, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(306.52, -197.15, 54.23, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(315.79, -194.79, 54.22, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(320.45, -194.13, 54.22, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(321.79, -189.81, 54.22, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(315.84, -219.66, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(310.17, -220.36, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(308.85, -224.63, 58.02, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(307.35, -213.24, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(3306.78, -208.53, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(302.52, -207.23, 58.02, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(311.22, -203.35, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(310.64, -198.74, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(306.33, -197.41, 58.02, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(315.78, -194.62, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(320.51, -194.11, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(321.73, -189.70, 58.02, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(339.20, -219.47, 54.22, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(339.93, -224.19, 54.22, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(344.24, -225.47, 54.22, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(342.93, -209.50, 54.22, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(343.61, -214.35, 54.22, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(348.01, -215.56, 54.22, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(346.78, -199.66, 54.22, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(347.34, -204.44, 54.22, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(351.86, -205.67, 54.22, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(335.00, -227.38, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(330.27, -228.04, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(328.99, -232.40, 58.02, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(339.27, -219.49, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(339.85, -224.16, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(344.21, -225.51, 58.02, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(343.08, -209.54, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(343.63, -214.27, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(3347.95, -215.52, 58.02, 132.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1156992775, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(346.69, -199.66, 58.02, 338.946), -- Coordinate of the door in the room
                StashCoord = vector4(347.49, -204.41, 58.02, 343.56), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(351.77, -205.64, 58.02, 132.82) -- Clothe / Wardrobe
            }
        }
    },
    {
        MotelName = "Motor Motel", -- Motel Name
        MotelMainCoord = vector4(-699.06, 5775.95, 17.33, 215.1), -- Motel Blip Coord
        Background = "img/motor.png",
        Show = true, -- If that is true a photo as background will be displayed / if its false a colorful moving background will be displayed
        MotelSocietyName = "MOTOMOTO", -- Motel Socienty / used for phone invoices
        InvoiceAmount = 50, -- a invoice amount if you use phone invoices
        MotelDistance = 30.0, -- distance for showing the door numbers when using /showrooms
        MotelBlip = {Id = 475, Color = 1, Scale = 0.6},
        MotelBlipOpen = true, --  If true, Motel Blip is activated.
        MotelDoorDistance = 1.5, -- The distance value of the players to the door
        ReceptionCoord = vector4(-702.47, 5789.73, 17.52, 265.24), -- Reception Location Vector4()
        Payment = true, -- If it is true, an invoice will be issued for the room rented by the players at certain time intervals.
        MarkerColor = {r = 57, g = 125, b = 199, a = 0.9}, -- Marker color adjustment available at the reception.
        RoomPrice = 70, -- Motel Room Rent Price / The first tax
        Wardrobe = true, -- If true, motel rooms have wardrobes.
        MotelDoors = {
            -- Motel Rooms Available. You can add a new hotel room to this list.
            -- (Note: For a new hotel room you add here, you need to add a new column to the infinity_motels table in the database.
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-681.7, 5770.69, 17.51, 248.51), -- Coordinate of the door in the room
                StashCoord = vector4(-677.03, 5770.99, 17.54, 336.73), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-675.93, 5768.63, 17.54, 336.39) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-683.41, 5766.64, 17.54, 261.15), -- Coordinate of the door in the room
                StashCoord = vector4(-678.9, 5767.13, 17.54, 299.53), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-678.03, 5764.43, 17.54, 334.82) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-685.34, 5762.77, 17.51, 212.0), -- Coordinate of the door in the room
                StashCoord = vector4(-680.65, 5763.13, 17.54, 347.1), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-679.88, 5760.79, 17.54, 263.72) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-687.43, 5759.1, 17.51, 242.05), -- Coordinate of the door in the room
                StashCoord = vector4(-681.69, 5756.64, 17.54, 319.85), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-682.58, 5759.23, 17.54, 349.07) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-690.38, 5759.54, 17.51, 160.26), -- Coordinate of the door in the room
                StashCoord = vector4(-690.1, 5754.68, 17.54, 265.82), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-692.55, 5753.87, 17.54, 167.67) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-694.33, 5761.29, 17.51, 248.11), -- Coordinate of the door in the room
                StashCoord = vector4(-694.04, 5756.55, 17.54, 257.49), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-696.42, 5755.61, 17.54, 170.5) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-698.902, 5763.044, 17.69054, 334.91101074213), -- Coordinate of the door in the room
                StashCoord = vector4(-677.03, 5770.99, 17.54, 336.73), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-700.47, 5757.36, 17.54, 274.62) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-702.21, 5764.75, 17.53, 36.11), -- Coordinate of the door in the room
                StashCoord = vector4(-701.81, 5760.23, 17.54, 278.86), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-675.93, 5768.63, 17.54, 336.39) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-705.94, 5766.71, 17.51, 160.75), -- Coordinate of the door in the room
                StashCoord = vector4(-705.75, 5762.02, 17.54, 256.6), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-708.27, 5761.19, 17.54, 124.31) -- Clothe / Wardrobe
            },
            {
                Owner = nil,
                KeyData = nil,
                Model = -1563640173, -- Model Number of the Door
                AutoLock = true, -- Auto Door Lock
                Coord = vector4(-710.04, 5768.5, 17.51, 167.63), -- Coordinate of the door in the room
                StashCoord = vector4(-709.73, 5763.92, 17.54, 258.85), -- Coordinate of the warehouse in the room
                StashLock = true,
                Wardrobe = vector4(-711.99, 5762.98, 17.54, 156.82) -- Clothe / Wardrobe
            },
        }
    },
}

The SQL



CREATE TABLE `infinity_motels` (
  `id` int(11) NOT NULL,
  `roomid` varchar(11) NOT NULL,
  `owner` varchar(255) DEFAULT NULL,
  `keydata` varchar(255) DEFAULT NULL,
  `invoices` int(255) NOT NULL DEFAULT 0,
  `bought` int(255) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


INSERT INTO `infinity_motels` (`id`, `roomid`, `owner`, `keydata`, `invoices`, `bought`) VALUES
(1, '1_1', NULL, NULL, 0, 0),
(2, '1_2', NULL, NULL, 0, 1),
(3, '1_3', NULL, NULL, 0, 1),
(4, '1_4', NULL, NULL, 0, 1),
(5, '1_5', NULL, NULL, 0, 0),
(6, '1_6', NULL, NULL, 0, 0),
(7, '1_7', NULL, NULL, 0, 0),
(8, '1_8', NULL, NULL, 0, 0),
(9, '1_9', NULL, NULL, 0, 0),
(10, '1_10', NULL, NULL, 0, 0),
(11, '1_11', NULL, NULL, 0, 0),
(12, '1_12', NULL, NULL, 0, 0),
(13, '1_13', NULL, NULL, 0, 0),
(14, '1_14', NULL, NULL, 0, 0),
(15, '2_1', NULL, NULL, 0, 0),
(16, '2_2', NULL, NULL, 0, 0),
(17, '2_3', NULL, NULL, 0, 0),
(18, '2_4', NULL, NULL, 0, 0),
(19, '2_5', NULL, NULL, 0, 0),
(20, '2_6', NULL, NULL, 0, 0),
(21, '2_7', NULL, NULL, 0, 0),
(22, '2_9', NULL, NULL, 0, 0),
(23, '2_10', NULL, NULL, 0, 0),
(24, '3_1', NULL, NULL, 0, 0);


ALTER TABLE `infinity_motels`
  ADD UNIQUE KEY `id` (`id`);


ALTER TABLE `infinity_motels`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
COMMIT;


|-------------------------------------|----------------------------|
| Code is accessible | Depends on version
| Subscription-based | Depends on version
| Lines (approximately) | 2000
| Requirements | QBCore
| Support | Yes

1 Like

This is not your script bro :slight_smile: give credits to Kibra

1 Like

This is my resources :slight_smile:

Yes… your resource is totally (absolutely) bugged on all sides and on top of that with no technical support or help from you. You know how to make money, but how to make good resources, not so much.

You can always open ticket in discord for support and there is no ticket for any bugs at this time

I was referring to Kibra who comes to you to comment on stupid things, when he is a cheat.

1 Like

Then you are right
Thank you