Documentation

Setup

Install and configure the laptop.

#Download

Download these from your CFX portal under Granted Assets:

  • Zyke's Laptop, the zyke_laptop resource.
  • Zyke's Business, the zyke_business resource. It comes with the laptop and is required.
  • Zyke's Laptop (Assets), the zyke_digitalden resource. It is the Digital Den building and staff clothing, where players buy laptops and supplies. It is optional, but heavily recommended.

If a resource is missing from your portal, see Lacking Entitlement.

#Dependencies

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

#Resources

Place zyke_laptop, zyke_business, and zyke_digitalden in your server's resources folder. Keep the folder names as they are.

#Items & Images

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 zyke_laptop/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 items include the laptop, the desktop_computer, the boot and installer sticks, the usb_drive data stick, the part items, the 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.

#Sounds

The laptop, crate, card reader, and barrier sounds are bundled in zyke_sounds 0.7.5 and newer. Keep zyke_sounds up to date and there is nothing to copy. On an older zyke_sounds, copy zyke_laptop/extras/sounds/laptop into zyke_sounds/nui/sounds/ and restart zyke_sounds. See Sounds From Other Resources.

#Database

The tables for zyke_laptop and zyke_business are created on their first start, so there is no SQL to import.

#Digital Den

zyke_digitalden stands at the Morningwood strip mall. The default shop counter, its staff shelves, and the laptops on show stand inside 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 zyke_laptop/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_sounds
ensure zyke_business
ensure zyke_digitalden
ensure zyke_laptop

zyke_business must start before zyke_laptop, or the laptop will not 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.