brandstation Developments
  • brandstation Developments
    • Information
    • Common Errors
  • 🚗Dealerships
    • Information
    • Docs
    • Exports
  • 🚨Dispatch
    • Information
    • Docs
    • Exports
  • 📱Advanced Drugsell
    • Information
    • Docs
    • Exports
Powered by GitBook
On this page
  • Installation
  • Download
  • Server.cfg
  • Config
  • SQL Insert
  1. Dealerships

Docs

Follow the following steps for your framework to ensure your script will work properly.

PreviousInformationNextExports

Last updated 3 months ago

Installation

1

Download

Download you asset from and drop it inside your server files. You can find your asset under Granted Assets, then download via the blue button.

2

Server.cfg

Add the line below to your server.cfg to ensure the script starts with the server. Note you can not change the name of the folder.

ensure bd_dealerships
3

Config

Options and configuration of the asset can be found in the config.lua file inside the asset folder.

4

SQL Insert

Insert this into your database and add new cars via the /dealershipadmin command ingame or via export

CREATE TABLE IF NOT EXISTS `cardealer_cars` (
  `model` mediumtext NOT NULL DEFAULT '',
  `display` mediumtext DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `category` varchar(50) DEFAULT NULL COMMENT 'This is admin only, just to get the correct car into the correct dealership',
  `brand` varchar(50) DEFAULT NULL,
  `image` longtext NOT NULL DEFAULT '',
  KEY `model` (`model`(768))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalogue for brandstation Cardealer';

// some test cars
INSERT INTO `cardealer_cars` (`model`, `display`, `price`, `category`, `brand`, `image`) VALUES
	('adder', 'Adder', 25000, '["default","sports"]', 'GTA', 'https://r2.fivemanage.com/image/dxkufaMYaogi.png'),
	('cyclone', 'Cyclone', 35000, '["sports"]', 'GTA', 'https://r2.fivemanage.com/image/akWsRVkK7Ypg.png'),
	('shamal', 'Shamal', 500000, '["plane"]', 'GTA', 'https://r2.fivemanage.com/image/LNFG4h4cWC5F.png'),
	('tropic', 'Tropic', 25000, '["boats"]', 'GTA', 'https://r2.fivemanage.com/image/QwO32tLptHvb.png'),
	('sentinel', 'Sentinel', 12500, '["default"]', 'GTA', 'https://r2.fivemanage.com/image/bNB4KvLfcaVr.png'),
	('mammatus', 'Mammatus', 500000, '["plane"]', 'GTA', 'https://r2.fivemanage.com/image/BCLmSD1x11mj.png'),
	('baller', 'Baller', 10000, '["default"]', 'SUV', 'https://r2.fivemanage.com/image/ufSdTxxtIPzw.png'),
	('iwagen', 'Iwagen', 30000, '["default"]', 'GTA', 'https://r2.fivemanage.com/image/YMdi3CfuUKzG.png'),
	('dominator', 'Dominator', 22500, '["sports"]', 'GTA', 'https://r2.fivemanage.com/image/FVxW6Z7C82jS.png');

CREATE TABLE IF NOT EXISTS `cardealer_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dealershipId` varchar(50) DEFAULT '',
  `orderDetails` longtext DEFAULT NULL COMMENT 'json saved for order',
  `orderPlacedTime` varchar(50) DEFAULT NULL COMMENT 'YYYY-MM-DD 00:00 saved as string for ease',
  `notes` longtext DEFAULT '',
  `timeLeft` varchar(50) DEFAULT '' COMMENT 'time left until put into stock',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='Orders for brandstation cardealer';

CREATE TABLE IF NOT EXISTS `cardealer_stock` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dealershipId` varchar(50) DEFAULT '' COMMENT 'dealershipId for the id of the dealership',
  `orderDetails` longtext DEFAULT NULL COMMENT 'Details for sales, all data',
  `orderPlacedTime` varchar(50) DEFAULT NULL COMMENT 'When order was placed',
  `notes` longtext DEFAULT '' COMMENT 'Notes',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='Stock for brandstation Cardealer';

🚗
keymaster