okokDocs
  • About Us
  • Scripts
    • okokVehicleControl
      • Config file
    • okokMechanicJob
      • Config file
    • okokPoliceJob
      • Config file
      • qb-inventory support
    • okokBossMenu
      • Config file
    • okokMulticharacter
      • Config file
    • okokPhone
    • okokSpawnSelector
      • Config file
      • qb-multicharacter support
    • okokLoadingScreen
      • Config file
    • okokVehicleSales
      • Config file
    • okokShop
      • Config file
    • okokGasStation
      • Config file
    • okokTuning
      • Config file
    • okokGarage
      • Config file
      • RGB vehicle colors
      • Inventories metadata
      • Housing integrations
      • qb-phone support
    • okokVehicleShop
      • Config file
      • Common errors
    • okokBanking
      • Config file
      • Paycheck transactions
      • Registering transactions
    • okokMarketplace
      • Config file
      • Common errors
    • okokChat
      • Config file
      • Export
    • okokBilling
      • Config file
      • Snippets
    • okokCrafting
      • Config file
    • okokContract
      • Config file
    • okokTalkToNPC
      • Config file
    • okokReports
      • Config file
    • okokNotify
      • Config file
      • Snippets
    • okokTextUI
      • Config file
      • Snippets
    • okokRequests
    • okokDeleteVehicles
      • Config file
  • Others
    • Discord Webhook
Powered by GitBook
On this page
  • Installation Guide
  • Set the Discord Webhook URL (to enable logs)
  • Server artifacts
  1. Scripts

okokVehicleSales

PreviousConfig fileNextConfig file

Last updated 12 months ago

Installation Guide

Execute the following SQL code in your database:

CREATE TABLE `okokvehiclesales_stores`(
    `store_name` varchar(255) NOT NULL,
    `store_id` varchar(255) NOT NULL PRIMARY KEY,
    `owner` varchar(255) NULL DEFAULT NULL,
    `owner_name` varchar(255) NULL DEFAULT NULL,
    `owner_phone` varchar(255) NULL DEFAULT NULL,
    `money` varchar(255) NOT NULL,
    `business_price` varchar(255) NOT NULL,
    `vehicles_sold_owner` varchar(255) DEFAULT 0,
    `total_earned_owner` varchar(255) DEFAULT 0,
    `vehicles` longtext NULL,
    `employees` longtext NULL,
    `inactivity_date` varchar(255) DEFAULT NULL
);

CREATE TABLE `okokvehiclesales_orders`(
    `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `store_id` varchar(255) NOT NULL,
    `vehicle` varchar(255) NOT NULL,
    `price` varchar(255) NOT NULL,
    `status` varchar(255) NOT NULL,
    `employee_name` varchar(255) NOT NULL,
    `employee_id` varchar(255) NOT NULL,
    `customer_name` varchar(255) NOT NULL,
    `customer_phone` varchar(255) NOT NULL,
    `notes` varchar(255) NOT NULL,
    `date` varchar(255) NOT NULL
);

CREATE TABLE `okokvehiclesales_saleshistory`(
    `store_id` varchar(255) NOT NULL,
    `seller_id` varchar(255) NOT NULL,
    `seller_name` varchar(255) NOT NULL,
    `vehicle_name` varchar(255) NOT NULL,
    `plate` varchar(255) NOT NULL,
    `value` varchar(255) NOT NULL,
    `date` varchar(255) NOT NULL
);

CREATE TABLE `okokvehiclesales_auctions`(
    `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `store_id` varchar(255) NOT NULL,
    `vehicle` varchar(255) NOT NULL,
    `plate` varchar(255) NOT NULL,
    `starting_bid` varchar(255) NOT NULL DEFAULT 0,
    `total_bids` varchar(255) NOT NULL DEFAULT 0,
    `higher_bid` varchar(255) NOT NULL DEFAULT 0,
    `higher_bidder_id` varchar(255) DEFAULT NULL,
    `higher_bidder_name` varchar(255) DEFAULT NULL,
    `higher_bidder_phone` varchar(255) DEFAULT NULL,
    `bidders` longtext NULL
);

If using ESX, execute the following code as well:

ALTER TABLE owned_vehicles ADD okokVehicleSalesOwned varchar(255) NOT NULL DEFAULT 0;

If using QBCore, execute the following code:

ALTER TABLE player_vehicles ADD okokVehicleSalesOwned varchar(255) NOT NULL DEFAULT 0;

Set the Discord Webhook URL (to enable logs)

Navigate to the sv_utils.lua file and paste the webhook URL in the line 2.

Server artifacts

Make sure your server artifacts version is above the 5181.

Windows:

Linux:

YouTube Video
How to create a Discord Webhook URL
https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/