TO ENSURE THE SCRIPT RD-PHARMACYJOB IS PROPERLY LOADED IN THE SERVER.CFG, YOU NEED TO ADD A LINE TO THE CONFIGURATION FILE THAT STARTS THE SCRIPT WHEN THE SERVER RUNS. THIS IS TYPICALLY DONE BY ADDING THE FOLLOWING LINE AT THE APPROPRIATE SECTION IN SERVER.CFG
INTEGRATION IN QBCORE, ESX AND OTHER FRAMEWORKS
THE PHARMACY JOB
QBCORE
go to qb-core/shared/jobs.lua
Add your job like this:
ESX
upload this sql
QBOX
qbx_core/shared/jobs.lua
Add your job like this:
ITEMS
If you don't have the items integrated correctly, you will receive random errors.
Check that you don't have duplicate items in your inventory or database before integrating them, otherwise you might have some errors.
QBCOREESXOX INVENTORY
The images which we used to the items are in the rd-pharmacyjob/images folder
SQL
UPLOAD THE SQL
ASSET POSITION
Correctly position the assets in the server.cfg by following this step, if something goes wrong you will probably get errors about exports not found, do not skip this step!
SETUP THE SCRIPT WEBHOOK
IF YOU WANT TO USE THE OPPORTUNITIES WHICH CAN BE GIVEN BY A WEBHOOK, THEN YOU WILL HAVE TO SET IT UP IN OUR ASSETS. YOU CAN DO THIS BY CHANGING A VALUE TO YOUR DISCORD WEBHOOK IN THE WEBHOOK.LUA FILE
CREATE TABLE IF NOT EXISTS `RD_PHARMACY` (
`job_name` VARCHAR(50) NOT NULL,
`balance` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`job_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS job_outfits (
id INT AUTO_INCREMENT PRIMARY KEY,
job VARCHAR(50) NOT NULL,
grades LONGTEXT NOT NULL,
name VARCHAR(100) NOT NULL,
skin LONGTEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS pharmacy_kicks (
citizenid VARCHAR(50) NOT NULL,
pharmacyName VARCHAR(50) NOT NULL,
expires BIGINT NOT NULL,
PRIMARY KEY(citizenid, pharmacyName)
);
CREATE TABLE IF NOT EXISTS `pharmacy_duty` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pharmacy` varchar(50) NOT NULL,
`citizenid` varchar(50) NOT NULL,
`minutes` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `citizen_pharmacy` (`citizenid`, `pharmacy`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
ensure es_extended or qb-core or qbx-core
ensure ox_lib
ensure [inventory]
ensure rd-pharmacyjob
Settings = Settings or {}
Settings.Webhook = "YOUR_WEBHOOK_HERE"