Customization
Settings are in config.lua. The files that talk to your framework, your inventory and your target resource are left open, so a server that does things differently can adapt them without touching the escrowed core.
Which file decides what
Section titled “Which file decides what”| File or folder | What it decides | Open? |
|---|---|---|
config.lua | Every setting on this page, the notification function, the items and flavours | Open |
locales/*.lua | Every text: menu, target labels, messages. One file per language | Open |
server_functions.lua | Getting a player, adding, removing and checking items, registering the usable items, the flavour list callback, and ReduceStress | Open |
client/client_functions.lua | Reading player data, and the job check for the setup menu | Open |
target/target.lua | Every target option on hookahs and furniture, for ox_target and qb-target | Open |
client/client.lua, server/server.lua, locale.lua | Placement, the hose, smoke, ownership and supplies | Escrowed |
html/ | The setup menu: index.html, style.css, script.js | Plain files |
inventory_items/ | Ready-made item definitions for ESX, ox_inventory and QBCore | Reference |
inventory_images/ | One icon per item | Assets |
mic_hookah_prop/stream/ | The ten hookah models | Assets, separate resource |
Framework, target and images
Section titled “Framework, target and images”| Option | What it does | Default |
|---|---|---|
Config.Locale | Language | en |
Config.Framework | esx, qbcore or qbox | esx |
Config.ESXResourceName | ESX’s folder name | es_extended |
Config.QBResourceName | QBCore’s folder name | qb-core |
Config.QBoxResourceName | QBox’s folder name | qbx_core |
Config.Target | ox_target or qb-target | ox_target |
Config.QBTargetResourceName | qb-target’s folder name | qb-target |
Config.InventoryImagePath | Where the setup menu loads flavour icons from | nui://ox_inventory/web/images/ |
Access
Section titled “Access”| Option | What it does | Default |
|---|---|---|
Config.AdminGroups | Groups that can open the menu of, and pick up, any hookah or furniture. false means everyone counts as admin | false |
Config.AllowedJobs | Jobs that may open the setup menu. false means any job | false |
Out of the box, anyone can manage anyone’s hookah. To make each hookah belong to the player who placed it, list your staff groups in Config.AdminGroups — for example admin and superadmin. On ESX the list is matched against the player’s group; on QBCore and QBox, against the player’s permission field.
With a list in place:
| Who | Open Setup Menu | Pick up | Grab Hose |
|---|---|---|---|
| The player who placed it | yes (if their job is allowed) | yes | yes |
| An admin group | yes (if their job is allowed) | yes | yes |
| Anyone else | no | no | yes |
Config.AllowedJobs only guards the setup menu. Anybody can grab the hose and smoke a lit hookah.
Smoking and supplies
Section titled “Smoking and supplies”| Option | What it does | Default |
|---|---|---|
Config.MaxActiveTime | What “full” means for charcoal and water. One hookah_coal or hookah_water fills it to this | 1800 |
Config.ConsumptionPerPuff | How much each puff takes off the charcoal and the water | 10 and 10 |
Config.MaxPuffsPerSession | Worked out from the two above (1800 ÷ 10 = 180). For your reference; the script does not read it | 180 |
Config.MaxHoseDistance | Metres the hose stretches before it snaps | 3.5 |
Config.MaxSimultaneousUsers | Intended cap on people smoking the same hookah | 4 |
Config.Stress | Calls ReduceStress on every puff | true |
The hookah does not burn down on a clock: charcoal and water only go down when somebody puffs. When either reaches zero the hookah goes out and needs a refill.
Stress
Section titled “Stress”ReduceStress in server_functions.lua receives the player’s server ID on every puff when Config.Stress is on. It ships empty, with commented examples: a client event, an export, or a server event from your stress or HUD resource. Put your call there.
| Option | What it does | Default |
|---|---|---|
Config.Particle | Which particle is used: a dict and a name | scr_recartheft / scr_wheel_burnout |
Config.VapeExhale | Size of the smoke | 0.5 |
The config marks these two as “don’t change unless you know what you’re doing”. Each cloud lasts three seconds and is shown to players within 150 metres.
Hookahs, furniture and flavours
Section titled “Hookahs, furniture and flavours”The full lists are on 🎒 Items.
Config.HookahItems — item name → model. To add a hookah, the model has to be streamed (for example in mic_hookah_prop/stream/ with an entry in its .ytyp), then add the line here and the item to your inventory.
Config.PlaceableProps — item name → propModel, type (furniture) and isChair. Any base-game prop works. Set isChair = true on anything that should offer Sit Down.
Config.Flavors — item name → settings:
| Field | What it does |
|---|---|
Label | Name shown in the setup menu |
SmokeColor | R, G, B colour of the smoke |
ScreenEffect | A GTA screen effect name played for the smoker, or false for none |
EffectDuration | Seconds the screen effect lasts |
The config links a list of screen effect names next to Config.Flavors. To add a flavour, copy an entry, give it a new item name, and add the item and its icon to your inventory.
Notifications
Section titled “Notifications”Config.Notify in config.lua sends every message: ShowNotification on ESX, Functions.Notify on QBCore and QBox, the console otherwise. Replace its body to use your own notify resource.
Languages
Section titled “Languages”Eleven files ship in locales/: en, es, fr, de, it, pt, ru, cn, nl, pl, tr. Pick one with Config.Locale.
The comment above Config.Locale also mentions jp, but no Japanese file ships; setting it shows “Locale [jp] does not exist”.
Each file covers the setup menu, the target labels and the messages. A few words are written into the Lua rather than the locale files: the placement hints (Rotate Right, Rotate Left, Height Up, Height Down, Place Prop, Cancel), “You are already placing an object”, and “None” for an empty flavour.
To add a language: copy locales/en.lua, change the key at the top to your code and translate. The manifest loads everything in locales/ on its own, so there is nothing else to register. Set Config.Locale, refresh and restart.
Adapting it to your server
Section titled “Adapting it to your server”| To change | Edit |
|---|---|
| A custom framework | The framework object at the bottom of config.lua, and the functions in server_functions.lua and client/client_functions.lua |
| A different inventory | AddItem, RemoveItem and HasItem in server_functions.lua, and the usable-item registration below them |
| A different target | target/target.lua — the option lists are shared, only the two addModel / AddTargetModel calls differ |
| Target labels, icons or distance | target/target.lua for icons and distance, locales/ for labels |
| Job rules | CheckJobAccess in client/client_functions.lua |
On QBCore and QBox with ox_inventory started, server_functions.lua also registers each hookah and furniture item through ox_inventory’s own use hook, as a fallback for setups where the QBCore item bridge does not pass the use on.
Keys and commands
Section titled “Keys and commands”| Key or command | When | What it does |
|---|---|---|
| E | Holding a hookah | Starts placing it |
| X | Holding a hookah | Puts it away without placing |
| Mouse wheel | Placing | Turns the preview |
| Arrow up / down | Placing | Raises or lowers the preview |
| E | Placing | Sets it down |
| X | Placing | Cancels |
| E | Holding the hose of a lit hookah | Takes a puff |
| X (“Hookah - Stand Up X”) | Sitting | Stands up. Rebindable in each player’s FiveM key bindings |
/hookah:chair:stand_up | Sitting | Same, as a command |