Database Setup
Run the SQL query in your database:
sql
CREATE TABLE IF NOT EXISTS `jobphone_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) NOT NULL,
`authorized` tinyint(1) NOT NULL DEFAULT 0,
`bank_amount` int(11) NOT NULL DEFAULT 0,
`earnings_rides` int(11) NOT NULL DEFAULT 0,
`earnings_eats` int(11) NOT NULL DEFAULT 0,
`earnings_parcel` int(11) NOT NULL DEFAULT 0,
`reviews` longtext DEFAULT NULL,
`history` longtext DEFAULT NULL,
`job_type` longtext DEFAULT NULL,
`offers` longtext DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Or use the jobphone.sql file included in this folder.
Inventory Setup
Add the Job Phone item to your inventory system.
QB-Core
Add to qb-core/shared/items.lua:
lua
['j0jobphone'] = {
['name'] = 'j0jobphone',
['label'] = 'Job Phone',
['weight'] = 200,
['type'] = 'item',
['image'] = 'j0jobphone.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A specialized phone for work tasks.'
},
OX Inventory
Add to ox_inventory/data/items.lua:
lua
['j0jobphone'] = {
label = 'Job Phone',
weight = 200,
stack = false,
close = true,
description = 'A specialized phone for work tasks.',
},
Start Resource
Add to server.cfg:
ensure J0-JobPhone
ensure J0-JobPhoneAssets
Restart server or use:
restart J0-JobPhone
restart J0-JobPhoneAssets
download this too https://forum.cfx.re/t/release-generic-dui-2d-3d-renderer/131208