Installation · origen_dealerships
1. Add to server.cfg
cfg
ensure ox_lib
ensure oxmysql
# Framework (use only one)
ensure qb-core
# ensure qbx_core
# ensure es_extended
ensure origen_dealerships2. Import the SQL
Execute the following SQL in your database:
sql
CREATE TABLE `origen_dealerships` (
`id` mediumtext DEFAULT NULL,
`label` mediumtext DEFAULT NULL,
`markers` longtext DEFAULT NULL,
`stocks` longtext DEFAULT NULL,
`settings` longtext DEFAULT NULL,
`blipConfig` longtext DEFAULT NULL,
`createdat` datetime DEFAULT CURRENT_TIMESTAMP,
`updatedat` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE `origen_dealerships_financing` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`playeridentifier` mediumtext DEFAULT NULL,
`dealershipid` mediumtext DEFAULT NULL,
`vehicle` mediumtext DEFAULT NULL,
`plate` mediumtext DEFAULT NULL,
`cuoteprice` int(11) DEFAULT NULL,
`cuotes` int(11) DEFAULT NULL,
`nextpaymentdate` datetime DEFAULT NULL,
`status` mediumtext DEFAULT NULL,
`delayed_payments` int(11) DEFAULT 0,
`createdat` datetime DEFAULT CURRENT_TIMESTAMP,
`updatedat` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;The origen_dealerships table stores all dealership configurations created via the in-game admin panel. The origen_dealerships_financing table tracks active vehicle financing contracts.
3. Configure the resource
Open config/general.lua and review at minimum:
Config.VehiclePurchase.defaultGarage— set to your server's garage resource IDConfig.FinancingConfig— enable or disable the financing systemConfig.AdminGroups— verify the admin group names match your server setup
See the Configuration page for full details.
4. Configure webhooks (optional)
Open config/logs.lua and replace each 'YOUR_WEBHOOK_URL' with your Discord webhook URLs:
lua
return {
enabled = true,
webhooks = {
['purchase'] = 'YOUR_WEBHOOK_URL',
['testdrive'] = 'YOUR_WEBHOOK_URL',
['financing'] = 'YOUR_WEBHOOK_URL',
['admin'] = 'YOUR_WEBHOOK_URL',
['stock'] = 'YOUR_WEBHOOK_URL',
}
}Set enabled = false if you do not want Discord logs. Leaving placeholder URLs active will cause HTTP errors in the console.