Setup
Install and configure the laptop.
#Download
Download these from your CFX portal under Granted Assets:
- Zyke's Laptop, the
zyke_laptopresource.- Zyke's Business, the
zyke_businessresource. It comes with the laptop and is required.- Zyke's Laptop (Assets), the
zyke_digitaldenresource. 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, andzyke_digitaldenin 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.txtorzyke_laptop/extras/items/qb-core.txtinto your configured inventory. Copy the icons fromzyke_laptop/extras/items/images/256/into the inventory's image directory, or the outlined versions fromextras/items/images/256/artwork/if your inventory uses that style.The items include the
laptop, thedesktop_computer, the boot and installer sticks, theusb_drivedata stick, the part items, the service tools, thehdmi_cable, and thelaptop_powerbank. Keep every item excepthdmi_cablenon-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
laptopitem for another script, rename ours underiteminshared/unlocked/config.lua, or setitem = falseto 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_soundsup to date and there is nothing to copy. On an olderzyke_sounds, copyzyke_laptop/extras/sounds/laptopintozyke_sounds/nui/sounds/and restartzyke_sounds. See Sounds From Other Resources.
#Database
The tables for
zyke_laptopandzyke_businessare created on their first start, so there is no SQL to import.
#Digital Den
zyke_digitaldenstands 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 setConfig.Shop.enabled = falseanddisplays = {}. See Shop.Optional staff setup:
- Add the
digitaldenjob fromzyke_laptop/extras/jobs/:esx.sqlfor ESX, or the entries inqb-core.txtandqbx_core.txtfor QBCore and Qbox. It opens the staff shelves and doors.- With
ox_doorlockorrcore_doorlock, the doors are added on start. Withrcore_doorlock, changedoorlock.pinfirst. Withqb-doorlockorcd_doorlock, use the files inextras/doorlock/and setdoorlock.enabled = false. Seeextras/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 inshared/unlocked/shop.lua, laptop builds inshared/unlocked/hardware.lua, and Wi-Fi hotspots inshared/unlocked/hotspots.luawith their passwords inserver/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.luaandserver/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:
cfgensure oxmysql ensure zyke_lib ensure zyke_sounds ensure zyke_business ensure zyke_digitalden ensure zyke_laptop
zyke_businessmust start beforezyke_laptop, or the laptop will not start. Withinteraction = "target", startox_targetorqb-targetbefore Laptop as well.
#Verify Gameplay
Give yourself a
laptopand 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.