Hotel Business
Create hotels entirely in-game, rent rooms with rotating keypad door codes driven by ox_doorlock, and run the revenue through a per-hotel treasury. Qbox, QBCore and ESX auto-detected.
A complete, self-contained hotel business for FiveM. Create hotels entirely in-game (front desk marker + map blip placed where you stand), manage rentable rooms with keypad door codes driven by ox_doorlock, and let players book rooms at the front desk with cash or bank. Revenue flows into a per-hotel treasury with owner withdraw/deposit.
Frameworks: Qbox (qbx_core) · QBCore (qb-core) · ESX (es_extended) — auto-detected, zero config.
Features
Management dashboard (/hotels)
- Create hotels in-game — stand at the front desk, click Use My Position, done. No coordinates to copy, no config files to edit.
- Blip control per hotel — sprite, color, scale, and an on/off toggle, all editable live from the NUI.
- Room management — room number, price per night, door code (custom or random), linked ox_doorlock door ID(s), and a keypad position placed where you stand.
- Door codes — regenerate a room's code with one click; codes also auto-regenerate on every booking and checkout, so past guests can never re-enter.
- Owner system — admins assign an owner per hotel (by server ID). Owners manage only their own hotels; admins manage everything.
- Treasury — booking revenue lands in each hotel's treasury; withdraw/deposit from the Overview tab.
- Booking history — last 50 bookings with guest, nights, and amount; 7-day revenue KPI.
Guest experience
- Walk-up front desk — press [E], pick a room and number of nights, pay cash or bank.
- Door code delivered instantly and always visible under My Stay (with a live countdown).
- [E] on the room keypad → enter the code → the ox_doorlock door toggles (or auto-relocks — configurable).
- Automatic checkout when the stay expires: door locks, code rotates, guest is notified.
- One active stay per character; early self-checkout at any desk.
Requirements
- ox_lib
- oxmysql
- ox_doorlock — optional but strongly recommended (without it, keypads report "door system unavailable"; everything else still works)
- Qbox, QBCore, or ESX
Installation
- Drop
rr-hotelinto your resources andensure rr-hotelafter ox_lib, oxmysql, your framework, and ox_doorlock. - Database tables are created automatically on first start (
sql/install.sqlis included for reference / manual import). - Restart, join, and run
/hotelsas an admin.
Setting up your first hotel (all in-game)
/hotels→ Hotels tab → type the hotel name → stand at the front desk → Use My Position → Create Hotel. The blip appears on the map immediately.- Create the room doors in ox_doorlock as usual (any auth setup — rr-hotel handles the code entry itself) and note each door ID.
- Rooms tab → pick the hotel → room #, price, doorlock door ID(s) (comma-separated for double doors) → stand at the room door → Use My Position → Add Room.
- Optionally assign an owner (player must be online — enter their server ID). Owners then run
/hotelsthemselves.
Configuration (config.lua)
| Option | Default | Description |
|---|---|---|
Config.Brand | G.A.S HOSPITALITY | NUI top-bar branding — set your server's name. Replace html/logo.png with your logo. |
Config.NightDuration | 86400 | Real seconds per "night" (86400 = 24 real hours). |
Config.MaxNights | 14 | Max nights per booking. |
Config.RelockSeconds | 0 | 0 = keypad toggles the lock; > 0 = door auto-relocks after N seconds. |
Config.ManageCommand | hotels | Dashboard command. |
Config.AdminAces | command, group.admin | ACE permissions that count as admin (txAdmin-friendly). |
Config.AdminGroup | admin | Framework permission group fallback. |
Config.DefaultBlip | sprite 475 | Defaults for new hotels (editable per hotel in the NUI). |
Locales
All player-facing text lives in locales/en.json. Copy it to locales/<lang>.json, translate, and set your server's ox_lib locale (setr ox:locale de).
Permissions model
- Admin (ACE
command/group.admin, or frameworkadmingroup): create/delete hotels, assign owners, manage everything. - Owner (assigned per hotel): full management of their own hotels — rooms, codes, blips, treasury.
- Everyone: front desk booking + keypads.
FAQ
Do I have to use ox_doorlock's passcode feature? No — create the door with any auth (or none). rr-hotel validates the code itself and toggles the door state, so codes can rotate per stay without touching your doorlock config.
What happens to a guest's stay on server restart? Stays are stored in the database with an absolute expiry timestamp — bookings survive restarts.
Can two hotels share a front desk? Each hotel has its own desk position; put them anywhere, including inside the same MLO.
Support: G.A.S. Team Developers — gasteamdevelopers.com
