Documentation

Setup

Install and configure the laptop.

#Dependencies

Install oxmysql and zyke_lib, and configure the framework and inventory providers in zyke_lib. See Dependencies.

#Resource & Items

Place the resource in your server's resources folder as zyke_laptop.

Copy the matching definitions from zyke_laptop/extras/items/ox_inventory.txt or zyke_laptop/extras/items/qb-core.txt into your configured inventory. Copy the icons from extras/items/images/256/ into the inventory's image directory, or the outlined versions from extras/items/images/256/artwork/ if your inventory uses that style.

The 19 items are the laptop, the desktop_computer, the boot and installer sticks, the usb_drive data stick, the six part items, the three service tools, the hdmi_cable, and the laptop_powerbank. Keep every item except hdmi_cable non-stackable/unique, since each one keeps its serial, parts, files, or charge in its metadata. Your inventory has to support item metadata.

If your server already has a laptop item for another script, rename ours under item in shared/unlocked/config.lua, or set item = false to open the laptop only through the exports.

#Digital Den

Install zyke_digitalden, the free Digital Den interior that comes with the laptop, at the Morningwood strip mall. The default shop counter, its staff shelves, and the laptops on show stand inside it.

The laptop runs without it. If your map already fills that unit, leave it out and move the shop's location, storages, displays, and doors in shared/unlocked/shop.lua, or set Config.Shop.enabled = false and displays = {}. See Shop.

Optional staff setup:

  • Add the digitalden job from extras/jobs/: esx.sql for ESX, or the entries in qb-core.txt and qbx_core.txt for QBCore and Qbox. It opens the staff shelves and doors.
  • With ox_doorlock or rcore_doorlock, the doors are added on start. With rcore_doorlock, change doorlock.pin first. With qb-doorlock or cd_doorlock, use the files in extras/doorlock/ and set doorlock.enabled = false. See extras/doorlock/README.md.

#Configuration

Edit shared/unlocked/config.lua. Review the interaction mode, placement limits, the casino and job board switches, cloud accounts, and the app store. Shop offers and prices are in shared/unlocked/shop.lua, laptop builds in shared/unlocked/hardware.lua, and Wi-Fi hotspots in shared/unlocked/hotspots.lua with their passwords in server/unlocked/hotspots.lua. Use the Config reference for current defaults.

Set your webhook URLs in zyke_lib/webhooks/laptop.lua. See Discord Logs.

Custom restrictions belong in client/unlocked/hooks.lua and server/unlocked/hooks.lua. Enforce trusted restrictions on the server. See Can-Check Hooks.

#Start Order

Start your configured providers and their dependencies before Laptop, and Laptop before any resource that registers apps, sites, contacts, or devices:

cfg
ensure oxmysql
ensure zyke_lib
ensure zyke_digitalden
ensure zyke_laptop

Database tables are created on first start. With interaction = "target", start ox_target or qb-target before Laptop as well.

#Admin Permissions

The admin commands use ACE permissions. Give them to a group in your server.cfg:

cfg
add_ace group.admin command.laptop_owner allow
add_ace group.admin command.laptop_charge allow
add_ace group.admin command.laptop_computer allow

See Commands.

#Verify Gameplay

Give yourself a laptop and use it. Finish the OS setup, put the laptop down with G, and use it from its keyboard. Visit Digital Den to see the shop and the laptops on show.