Skip to content

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.


File or folderWhat it decidesOpen?
config.luaEvery setting on this page, the notification function, the items and flavoursOpen
locales/*.luaEvery text: menu, target labels, messages. One file per languageOpen
server_functions.luaGetting a player, adding, removing and checking items, registering the usable items, the flavour list callback, and ReduceStressOpen
client/client_functions.luaReading player data, and the job check for the setup menuOpen
target/target.luaEvery target option on hookahs and furniture, for ox_target and qb-targetOpen
client/client.lua, server/server.lua, locale.luaPlacement, the hose, smoke, ownership and suppliesEscrowed
html/The setup menu: index.html, style.css, script.jsPlain files
inventory_items/Ready-made item definitions for ESX, ox_inventory and QBCoreReference
inventory_images/One icon per itemAssets
mic_hookah_prop/stream/The ten hookah modelsAssets, separate resource

OptionWhat it doesDefault
Config.LocaleLanguageen
Config.Frameworkesx, qbcore or qboxesx
Config.ESXResourceNameESX’s folder namees_extended
Config.QBResourceNameQBCore’s folder nameqb-core
Config.QBoxResourceNameQBox’s folder nameqbx_core
Config.Targetox_target or qb-targetox_target
Config.QBTargetResourceNameqb-target’s folder nameqb-target
Config.InventoryImagePathWhere the setup menu loads flavour icons fromnui://ox_inventory/web/images/

OptionWhat it doesDefault
Config.AdminGroupsGroups that can open the menu of, and pick up, any hookah or furniture. false means everyone counts as adminfalse
Config.AllowedJobsJobs that may open the setup menu. false means any jobfalse

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:

WhoOpen Setup MenuPick upGrab Hose
The player who placed ityes (if their job is allowed)yesyes
An admin groupyes (if their job is allowed)yesyes
Anyone elsenonoyes

Config.AllowedJobs only guards the setup menu. Anybody can grab the hose and smoke a lit hookah.


OptionWhat it doesDefault
Config.MaxActiveTimeWhat “full” means for charcoal and water. One hookah_coal or hookah_water fills it to this1800
Config.ConsumptionPerPuffHow much each puff takes off the charcoal and the water10 and 10
Config.MaxPuffsPerSessionWorked out from the two above (1800 ÷ 10 = 180). For your reference; the script does not read it180
Config.MaxHoseDistanceMetres the hose stretches before it snaps3.5
Config.MaxSimultaneousUsersIntended cap on people smoking the same hookah4
Config.StressCalls ReduceStress on every pufftrue

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.

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.


OptionWhat it doesDefault
Config.ParticleWhich particle is used: a dict and a namescr_recartheft / scr_wheel_burnout
Config.VapeExhaleSize of the smoke0.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.


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:

FieldWhat it does
LabelName shown in the setup menu
SmokeColorR, G, B colour of the smoke
ScreenEffectA GTA screen effect name played for the smoker, or false for none
EffectDurationSeconds 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.


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.


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.


To changeEdit
A custom frameworkThe framework object at the bottom of config.lua, and the functions in server_functions.lua and client/client_functions.lua
A different inventoryAddItem, RemoveItem and HasItem in server_functions.lua, and the usable-item registration below them
A different targettarget/target.lua — the option lists are shared, only the two addModel / AddTargetModel calls differ
Target labels, icons or distancetarget/target.lua for icons and distance, locales/ for labels
Job rulesCheckJobAccess 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.


Key or commandWhenWhat it does
EHolding a hookahStarts placing it
XHolding a hookahPuts it away without placing
Mouse wheelPlacingTurns the preview
Arrow up / downPlacingRaises or lowers the preview
EPlacingSets it down
XPlacingCancels
EHolding the hose of a lit hookahTakes a puff
X (“Hookah - Stand Up X”)SittingStands up. Rebindable in each player’s FiveM key bindings
/hookah:chair:stand_upSittingSame, as a command