-
Notifications
You must be signed in to change notification settings - Fork 191
02. Database
Dutch Players edited this page Mar 23, 2021
·
6 revisions
Be sure to upload all SQL injections from all dependencies! Do you have issues with MySQL-async? Download the correct version here: https://github.com/dutchplayers/fivem-mysql-async
CREATE TABLE IF NOT EXISTS `glovebox_inventory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plate` varchar(8) NOT NULL,
`data` text NOT NULL,
`owned` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `plate` (`plate`)
);
CREATE TABLE IF NOT EXISTS `trunk_inventory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plate` varchar(8) NOT NULL,
`data` text NOT NULL,
`owned` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `plate` (`plate`)
);
ALTER TABLE `items`
ADD COLUMN `price` int(11) NOT NULL DEFAULT 0
;
INSERT INTO `items` (`name`, `label`, `limit`, `rare`, `can_remove`, `price`) VALUES
('WEAPON_FLASHLIGHT', 'Flashlight', 1, 0, 1, 0),
('WEAPON_STUNGUN', 'Taser', 100, 1, 1, 0),
('WEAPON_KNIFE', 'Knife', 100, 1, 1, 0),
('WEAPON_BAT', 'Baseball Bat', 1, 0, 1, 0),
('WEAPON_PISTOL', 'Pistol', 100, 1, 1, 0),
('WEAPON_PUMPSHOTGUN', 'Pump Shotgun', 1, 0, 1, 0),
('9mm_rounds', '9mm Rounds', 20, 0, 1, 0),
('shotgun_shells', 'Shotgun Shells', 20, 0, 1, 0)
;
If you want to change the price of an item, go open your database, go to table items and change the value from the price column.
If you need additional support, please contact us through our Discord server.