Installation
Ten minutes: two folders, one SQL file, eight items.
Before you start
Section titled “Before you start”| You need | Why |
|---|---|
| ESX, QBCore or QBox, running | Payment, items and usable items. Detected on its own |
| oxmysql, running | The leaderboards |
| ox_target or qb-target (optional) | Only if you want target interaction |
1. Put both folders in place
Section titled “1. Put both folders in place”Your download has two resources. Drop both into your resources, for example inside resources/[mic]/:
| Folder | What it is |
|---|---|
mic_arcade | The script and the games |
mic_arcade_props | The seven cabinet models and the renderer that puts the game on their screens |
2. Start order
Section titled “2. Start order”In server.cfg, below oxmysql and your framework, start mic_arcade_props and then mic_arcade, each on its own ensure line.
It worked when you join and the fixed machines are standing at the coordinates listed in config.lua — out of the box that is a row of four: Pixel, Race, Tower and Road.
3. The database
Section titled “3. The database”Import install.sql (in the root of mic_arcade) once. It creates one table, mic_arcade_leaderboard, which holds each character’s best score per game.
The script does not create this table itself. Without it, games still play but scores are not saved and the leaderboard stays empty.
It worked when your database has a mic_arcade_leaderboard table.
4. Add the items
Section titled “4. Add the items”| Item | What it does |
|---|---|
arcade_coin | The currency for a game when Config.PaymentType = 'item' (the default) |
arcade_alien | Places an Alien cabinet |
arcade_brick | Places a Breakout cabinet |
arcade_duofight | Places a DuoFight cabinet |
arcade_pixel | Places a Pixel cabinet |
arcade_race | Places a Race cabinet |
arcade_road | Places a Road cabinet |
arcade_tower | Places a Tower cabinet |
The script never hands out coins or cabinets by itself. Sell them in a shop, give them from a job, or give them with your admin menu.
The ready-made definitions ship in mic_arcade/items/, and the icons in mic_arcade/items/images/:
| Inventory | Definitions (mic_arcade/items/) | Where they go | Icons |
|---|---|---|---|
| ox_inventory | ox.lua | ox_inventory/data/items.lua | Copy items/images/*.png to ox_inventory/web/images/ |
| QBCore / qb-inventory | qbcore.lua | qb-core/shared/items.lua | Copy them to qb-inventory/html/images/ |
| ESX default inventory | esx_items.sql | Import it once on your database | — |
The entries in the two .lua files are commented out — remove the leading -- when you paste them.
It worked when you give yourself one of each and all eight show in your inventory with their icon.
5. Framework and interaction
Section titled “5. Framework and interaction”The framework needs nothing: ESX, QBCore or QBox is found on start. QBox is picked up through its QBCore compatibility — qbx_core provides qb-core — so there is nothing to set.
Interaction is Config.Interaction in config.lua. It ships as ox-target — with a dash in this script. Set it to qb-target if that is what you run, or to drawtext for a plain Press E prompt.
6. First game
Section titled “6. First game”- Give yourself at least 100
arcade_coin— every cabinet but DuoFight costs 100 out of the box. - Walk to one of the fixed machines and choose Play Arcade (or press E with drawtext).
- Start a game from the machine’s menu. The machine’s
Priceis taken in coins. - Press ESC to step away from the machine.
It worked when the camera moves in to the screen, the game plays, and your coins went down by the price.
Then try placing one: use arcade_race, move the preview with your view, rotate with the scroll wheel, and press E (ESC or Backspace cancels). Look at it again and you get a Pick Up Arcade option only you can see.
Before you open your city
Section titled “Before you open your city”- Decide the currency.
Config.PaymentTypeships asitemwitharcade_coin. If you keep it, make sure players can actually get coins somewhere. - Set the prices per cabinet in
Config.Arcades. - Place the fixed machines where you want them, or comment them out and let players place their own.
- Tell players placed machines are temporary. A placed cabinet stays until the resource or the server restarts; picking it up first gives the item back. See Troubleshooting.