> For the complete documentation index, see [llms.txt](https://f4-studio.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://f4-studio.gitbook.io/documentation/resources/f4-vendingmachine.md).

# f4-vendingmachine

Robotic vending machines for FiveM: a real gantry arm behind the glass, five machine types, 35 original products and a physical keypad.

f4-vendingmachine puts robotic vending machines on your server. A player walks up to the keypad on the side of the cabinet, types a code (A1 to D5), chooses cash or card and pays. Behind the glass a gantry arm drives to the right shelf, its jaws grip the product, pull it out of the lane, carry it to the delivery port and let go. The product drops into the tray, the player bends down to take it out, and it lands in their inventory.

![F4 Robotic Vending Machine](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FW3oR7VoILz9xSQk5B1PH%2Ff4-vendingmachine-thumbnail.jpg?alt=media)

Nothing is faked. The product you see standing on the shelf is the product that travels with the arm into the tray, and every player nearby watches the same motion.

It runs on Qbox, QBCore and ESX, and standalone. ox\_inventory, qb-inventory (and ps / lj), the ESX inventory and the framework's own inventory are built in.

## What is in it

| Area                            | What it covers                                                                                                                                                               |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Machine types**               | Drinks & Snacks, Sweet Treats, Ice Cold Drinks, Coffee & Bakery and Health & Care. Each has its own paint, signs, side panels, display colours, interior light and products. |
| **The mechanism**               | The beam, carriage, two telescopic stages, gripper head, both jaws and the delivery flap are separate props driven along one timeline on every client.                       |
| **Products**                    | 35 original products modeled from scratch, plus 8 of GTA's own brands (eCola, Sprunk, Flow, P's & Q's…). Any other GTA prop can be sold too.                                 |
| **The keypad is the interface** | No menu opens. The camera frames the front of the machine and the player clicks its real keys, its CASH / CARD buttons, and reads its display. Keyboard works too.           |
| **Stock you can see**           | Every product in stock stands on the shelf. Each sale visibly takes one away; restocking fills the lanes again.                                                              |
| **Collection tray**             | The bought product waits in the tray for its buyer only. Left too long, it goes to the buyer's inventory, or is delivered on their next login.                               |
| **Usable products**             | Every product can be eaten, drunk or used: hunger, thirst, stress, health and armour, with an animation and the product in the hand.                                         |
| **Branding**                    | Ship unbranded, or paint your server's or shop's name on every sign, side panel, badge and the display.                                                                      |
| **Interaction**                 | Built-in \[E] prompt, ox\_target, qb-target or the ox\_lib text UI.                                                                                                          |
| **Persistence**                 | Stock, prices, machines placed in game and undelivered items are saved in server KVP. No database needed.                                                                    |
| **Languages**                   | English and Turkish.                                                                                                                                                         |

## Machine types

| Drinks & Snacks                                                                                                                                                                    | Sweet Treats                                                                                                                                                                     | Ice Cold Drinks                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FFxlAWg1vXH4360KjtmSg%2Ff4vm-type_snacks.jpg?alt=media) | ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2Fe9mVKpI4rbV1rNAuHaTP%2Ff4vm-type_cute.jpg?alt=media) | ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FRRY3NTzc5F4KhAhrMjCb%2Ff4vm-type_drinks.jpg?alt=media) |
| `snacks`                                                                                                                                                                           | `cute`                                                                                                                                                                           | `drinks`                                                                                                                                                                           |

| Coffee & Bakery                                                                                                                                                                  | Health & Care                                                                                                                                                                        | Classic GTA brands                                                                                                                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FCcypD0MXMOtwmevgkjHQ%2Ff4vm-type_cafe.jpg?alt=media) | ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2F5P6XW8jl8uEKUpi5Rd2o%2Ff4vm-type_pharmacy.jpg?alt=media) | ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FqEuOXKKTPvH4UDxdoCtA%2Ff4vm-classic_front.jpg?alt=media) |
| `cafe`                                                                                                                                                                           | `pharmacy`                                                                                                                                                                           | any type with the `classic` profile                                                                                                                                                  |

## The arm

| Extracting                                                                                                                                                                            | Gripper                                                                                                                                                                                | Delivery                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FunutxxGUvaEfAJXFXpgQ%2Ff4vm-arm_extracting.jpg?alt=media) | ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FfKSXnMRgnzAEpFp9XBVa%2Ff4vm-gripper_closeup.jpg?alt=media) | ![](https://1863957031-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZWRXRhAaL8WMQT8WqFJi%2Fuploads%2FqG08Xto9BPLKbNYjiqDx%2Ff4vm-delivery_tray.jpg?alt=media) |

{% hint style="info" %}
The server owns every sale. It validates the player, locks the machine, charges exactly once and refunds if anything fails. The arm's timeline is the same on the server and every client, so a player who walks away mid-sale still finds the product in the tray.
{% endhint %}

## Where to start

* [Requirements](/documentation/resources/f4-vendingmachine/getting-started/requirements.md) — what the server needs.
* [Installation](/documentation/resources/f4-vendingmachine/getting-started/installation.md) — the folder, the start order and the items.
* [Placing Machines](/documentation/resources/f4-vendingmachine/getting-started/placing-machines.md) — put machines anywhere with `/vmplace` or in the config.
* [Products](/documentation/resources/f4-vendingmachine/configuration/products.md) — prices, your own products, and GTA props.
* [Hooks and Events](/documentation/resources/f4-vendingmachine/developers/hooks-and-events.md) — react to sales from your own resources.
