WhereiamL
whereiaml_arcade

Installation

Drop it in, add the item, and you're done. The database table builds itself.

requirements

these are on basically every qbox / qbcore / esx server already.

steps

  1. drop the whereiaml_arcade folder into your resources.
  2. add it to your server.cfg, after ox_lib and oxmysql:
ensure whereiaml_arcade
  1. add the item to your inventory (below).
  2. give yourself the item and use it, or open it with the /arcade command or the keybind.

the leaderboard table is created on first start, you don't run any sql.

adding the item

ox_inventory

add this to ox_inventory/data/items.lua:

['retro_console'] = {
    label = 'Retro Console',
    weight = 900,
    stack = false,
    close = true,
    description = 'A pocket handheld. Boot it up and play.',
    client = {
        export = 'whereiaml_arcade.open'
    }
},

qb-inventory

add this to qb-core/shared/items.lua:

retro_console = { name = 'retro_console', label = 'Retro Console', weight = 900, type = 'item', image = 'retro_console.png', unique = false, useable = true, shouldClose = true, description = 'A pocket handheld. Boot it up and play.' },

on qb-inventory (and esx) the resource registers the usable item for you, so using it just works.

opening it other ways

itemName, command and the keybind all live in config.lua. the command is on by default (/arcade), the keybind is off. from code you can open it directly:

exports.whereiaml_arcade:open()
-- or on the server, for a specific player:
TriggerClientEvent('whereiaml_arcade:open', src)

On this page