๐งฉ Script Install
๐ฅ Download & Setup
- Download the resource from Keymaster and place it inside your
resourcesfolder. - Download and install ox_lib
๐งพ Server.cfg
Add the following lines to your server.cfg:
ensure ox_lib ensure J0-busSimulator
๐งฉ Item Setup
QBCore โ qb-core/shared/items.lua
lua
bustablet = { name = 'bustablet', label = 'Bus Tablet', weight = 100, type = 'item', image = 'bustablet.png', unique = true, useable = true, shouldClose = false, description = 'Bus Tablet' },
bus_idcard = { name = 'bus_idcard', label = 'Bus Id Card', weight = 100, type = 'item', image = 'bus_idcard.png', unique = true, useable = true, shouldClose = false, description = 'Bus Id Card' },
๐ OX Inventory โ ox_inventory/data/items.lua
lua
['bustablet'] = { label = "Bus Tablet", weight = 100, stack = false, close = true, description = "Bus Tablet", client = { image = "bustablet.png" } },
['bus_idcard'] = { label = "Bus Id Card", weight = 100, stack = false, close = true, description = "Bus Id Card", client = { image = "bus_idcard.png" } },
๐ผ๏ธ Images
qb-inventory/html/images/
ox_inventory/web/images/
Add all .png files here (binoculars, dogs, meat, etc.)
๐๏ธ Database Setup
Execute:
CREATE TABLE IF NOT EXISTS `bus_business_data` (
`cid` VARCHAR(50) NOT NULL PRIMARY KEY,
`balance` DECIMAL(15,2) DEFAULT 0.00,
`employees` LONGTEXT DEFAULT NULL,
`applicants` LONGTEXT DEFAULT NULL,
`vehicles` LONGTEXT DEFAULT NULL,
`transactions` LONGTEXT DEFAULT NULL,
`company_name` VARCHAR(100) DEFAULT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_cid` (`cid`),
INDEX `idx_company_name` (`company_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;