MBT Drink Machine
MBT Drink Machine adds an interactive vending machine to your FiveM server. Players can buy drinks from any existing prop_vend_soda_02 prop in the world, or deploy their own portable machine using an inventory item.
A custom animated NUI opens when a player interacts with the machine — showing available drinks, prices and a grab animation on purchase.
Features
- Custom NUI — animated vending machine interface with drink selection, prices and sound effects
- Deployable machine — players with the
vendingmachineitem can place a machine anywhere in the world - Works on existing props — interacts with the native GTA
prop_vend_soda_02(or any prop you configure) - Two interaction modes —
ox_target/qb-targetfor prop-based targeting, or proximity +Ekey (marker mode) without a target script - Configurable drinks — add, remove or rename drinks and set individual prices per item
- Smart payment — checks cash first, then bank; inventory weight is validated before the purchase
- Prop placement mode — move and rotate the machine after placement with keyboard controls
- Repack system — any player can repack the deployed machine back into the
vendingmachineitem - Multi-framework — ESX (Legacy + old), QBCore and OX Core
Supported Frameworks
| Framework | Supported |
|---|---|
| ESX Legacy | ✅ |
| ESX (old) | ✅ |
| QBCore | ✅ |
| OX Core | ✅ (CustomFramework = true) |
How it works
- Player approaches any vending machine prop (or uses the
vendingmachineitem to deploy one) - Interaction via ox_target or the
Ekey opens the NUI - The NUI shows all configured drinks with prices
- Player selects a drink → server checks cash/bank balance and inventory weight
- If all checks pass: money is deducted and the drink item is added; an arm animation plays on the client
- The NUI closes automatically after the purchase
The resource name must remain mbt_drink_machine exactly. The script checks its own name on startup and stops itself if renamed.