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
  • Vehicle Keys
  • Stolen Vehicle
  • Adding vehicle images
  • Set the Discord Webhook URL (to enable logs)
  • Server artifacts
  1. Scripts

okokGarage

PreviousConfig fileNextConfig file

Last updated 12 months ago

Installation Guide

Execute the following SQL code in your database:

CREATE TABLE `okokgarage_pgarages` (
    `garagename` VARCHAR(250) NULL DEFAULT NULL,
    `coords` VARCHAR(250) NULL DEFAULT NULL,
    `type` VARCHAR(50) NULL DEFAULT NULL,
    `owners` VARCHAR(250) NULL DEFAULT NULL
);

CREATE TABLE `okokgarage_companies` (
    `company_name` VARCHAR(50) NOT NULL,
    `owner` VARCHAR(255) NULL DEFAULT NULL,
    `owner_name` VARCHAR(50) NULL DEFAULT NULL,
    `money` INT(11) NULL DEFAULT NULL,
    `employees` LONGTEXT NULL DEFAULT NULL,
    `total_sales` INT(11) NULL DEFAULT NULL,
    `sales_history` LONGTEXT NULL DEFAULT NULL,
    CONSTRAINT `employees` CHECK (json_valid(`employees`))
);

CREATE TABLE `okokgarage_sharedgarages` (
    `owner` VARCHAR(255) NULL DEFAULT NULL,
    `ownername` VARCHAR(50) NULL DEFAULT NULL,
    `sharedwith` LONGTEXT NULL DEFAULT NULL
);

ESX

ALTER TABLE `owned_vehicles`
    ADD COLUMN `parking` VARCHAR(60) NULL DEFAULT NULL,
    ADD COLUMN `doorcondition` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `windowcondition` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `tyrecondition` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `favourite` TINYINT(1) NULL DEFAULT 0,
    ADD COLUMN `impoundTime` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `location` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `reason` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `sharedwith` LONGTEXT NULL DEFAULT '[]',
    ADD COLUMN `vehiclename` varchar(23) NULL DEFAULT NULL
;

QBCore

ALTER TABLE `player_vehicles`
    ADD COLUMN `parking` VARCHAR(60) NULL DEFAULT NULL,
    ADD COLUMN `doorcondition` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `windowcondition` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `tyrecondition` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `favourite` TINYINT(1) NULL DEFAULT 0,
    ADD COLUMN `impoundTime` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `location` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `reason` VARCHAR(255) NULL DEFAULT NULL,
    ADD COLUMN `sharedwith` LONGTEXT NULL DEFAULT '[]',
    ADD COLUMN `vehiclename` varchar(23) NULL DEFAULT NULL
;

Vehicle Keys

TriggerServerEvent("okokGarage:GiveKeys", plate)
TriggerServerEvent("okokGarage:RemoveKeys", plate, source)
TriggerEvent("okokGarage:GiveKeys", plate)
TriggerEvent("okokGarage:RemoveKeys", plate, source)

Stolen Vehicle

Once triggered, the only way for a player to recover their vehicle is to go to the police station and pay to get the vehicle back in their garage.

TriggerServerEvent("okokGarage:setVehicleStolen", plate)

Adding vehicle images

To add images to the vehicles, simply drop them in the web/img/vehicles folder with the same id as the vehicle (the images should be in the PNG format).

Set the Discord Webhook URL (to enable logs)

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

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/