


Was this page helpful?
All configuration lives in config.lua, which is escrow_ignore-listed — you always have full access to it.
MBT.Debug = false
MBT.ESXLegacy = true
MBT.CustomFramework = false| Option | Type | Default | Description |
|---|---|---|---|
MBT.Debug | boolean | false | Prints debug messages to the server/client console. Useful for troubleshooting. Disable in production. |
MBT.ESXLegacy | boolean | true | Set to true if you use ESX Legacy. Set to false for old ESX versions. Ignored if using QB or OX. |
MBT.CustomFramework | boolean | false | Set to true if using OX Core as standalone (no ESX/QB). |
MBT.Props = {`prop_vend_soda_02`}Array of GTA prop hashes that the script will detect as interactable vending machines. Players approaching any of these props trigger the interaction.
To add more prop types:
MBT.Props = {
`prop_vend_soda_02`,
`prop_vend_soda_01`,
}MBT.PropsTo = {
["Drink"] = `prop_vend_soda_02`,
}MBT.PropsTo defines the prop spawned when a player deploys the vendingmachine item. Change the hash to use a different model.
Defines available drinks, their price and the inventory item given on purchase.
MBT.Drinks = {
["coke"] = { ["Price"] = 5, ["Item"] = "cola" },
["sprite"] = { ["Price"] = 5.9, ["Item"] = "sprite" },
["fanta"] = { ["Price"] = 5.99, ["Item"] = "fanta" },
["water"] = { ["Price"] = 5, ["Item"] = "water" },
}| Field | Type | Description |
|---|---|---|
| Key | string | Internal drink ID — matches the NUI slot name. Do not rename: "coke", "sprite", "fanta", "water". |
Price | number | Price in your server's currency. Deducted from cash first, then bank. |
|
The drink keys ("coke", "sprite", "fanta", "water") are tied to the NUI interface. Do not rename them — the UI maps slots to these exact keys. You can change prices and item names freely.
MBT.ItemName = "vendingmachine"The inventory item name that deploys the machine when used. Must match the item registered in your inventory system.
MBT.UseTarget = true -- ox_target / qb-target
MBT.DisplayHint = false -- show proximity hint (marker mode only)
MBT.DetectDistance = 7.0 -- distance to start scanning for props
MBT.HintDistance = 1.0 -- distance to show hint / enable E key| Option | Type | Default | Description |
|---|---|---|---|
MBT.UseTarget | boolean | true | true = use a target script. false = proximity detection + E key. |
MBT.DisplayHint | |
MBT.CustomHint = {
["Enabled"] = true,
["Looped"] = false, -- true = re-render every frame
["Show"] = function(label)
exports.ox_lib:showTextUI(label)
end,
["Hide"] = function()
exports.ox_lib:hideTextUI()
end
}Replace Show and Hide with your own UI calls if you don't use ox_lib.
MBT.SetupTarget in config.lua registers the interaction options on deployed machine props. It ships with ox_target enabled and qb-target commented out.
ox_target (default):
exports.ox_target:addModel(MBT.Props, {
{ label = "Use", icon = "fas fa-mug-hot", event = 'mbt_drink_machine:openMalidrink', distance = 2.5 }
})Switching to qb-target: comment out the ox_target block and uncomment the qb-target block inside MBT.SetupTarget.
Used when repositioning a deployed machine (same as mbt_camp):
MBT.MoveControls = {
["Up"] = 44, -- Q — raise
["Down"] = 20, -- Z — lower
["Forward"] = 172, -- ↑ Arrow — forward
["Back"] = 173, -- ↓ Arrow — backward
["Left"] = 174, -- ← Arrow — left
["Right"] = 175, -- → Arrow — right
["RotateLeft"] = 117, -- NUMPAD 9 — rotate
["RotateRight"] = 118, -- NUMPAD 7 — rotate
["Confirm"] = 179, -- SPACE — confirm
}
MBT.Language = {
["press_to_interact"] = "Press ~p~E~s~ for drink machine",
["not_enough_money"] = "You don't have enough money",
["too_heavy"] = "You can't carry more weight!",
["get_drink"] = "Get your drink",
["choose_drink"] = "Choose your drink!",
["Veh_Banned"] = "You can't use this in a vehicle!",
["Move_Entry"] = "Move",
["Delete_Kit"] = "Repack Kit",
-- ...
}All visible strings can be translated by editing the MBT.Language table. The same table is also sent to the NUI at startup.
MBT.Notification = function(source, text, text2)
-- add your notification call here
endThe default MBT.Notification is empty — fill it in with your server's notification system. It receives (source, message, title).
string |
| Inventory item name given to the player on purchase. Must exist in your inventory system. |
false |
When in proximity mode, shows a TextUI hint near the machine. Ignored when UseTarget = true. |
MBT.DetectDistance | number | 7.0 | Radius around the player to start scanning for nearby machine props. |
MBT.HintDistance | number | 1.0 | Distance at which the hint appears and the E key becomes active (proximity mode only). |