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.txtorzyke_laptop/extras/items/qb-core.txtinto your configured inventory. Copy the icons fromextras/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 19 items are the
laptop, thedesktop_computer, the boot and installer sticks, theusb_drivedata stick, the six part items, the three 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.
#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 setConfig.Shop.enabled = falseanddisplays = {}. See Shop.Optional staff setup:
- Add the
digitaldenjob fromextras/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_digitalden ensure zyke_laptopDatabase tables are created on first start. With
interaction = "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.