Installation

Follow these steps to use kc_garage

🛠️ Step 1: Put in your resouces file


  1. Download resouces kc_garagev2

  2. Extract file and put kc_garagev2 in your resource files

🛠️ Step 2: Insert SQL Query


Enter the database query below into your database server.

Premium Garage SQL

/* [[[ PREMIUM GARAGE ]]] */
CREATE TABLE IF NOT EXISTS `premium_garage` (
  `identifier` varchar(60) NOT NULL,
  `class` varchar(60) NOT NULL,
  `date_regist` timestamp NULL DEFAULT NULL,
  `expired` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Vehicle SQL

ESX
  • If you don't have an owned_vehicles database you can add the query below to your database. If you already have one you can skip this step.

  • These are the additional columns required for this script

  • if you are using ox_inventory this field is required

QB
  • If you don't have a player_vehicles database you can add the query below to your database. If you already have one you can skip this step.

  • these are the additional columns required for this script

  • if you are using ox_inventory this field is required

🛠️ Step 3: Configuration


You can edit the configuration in shared/config.lua

Default Config

This is the config that you get the first time. Please customize this config to your server.

🛠️ Step 4: Setup Garages


You can make a garage according to the place you want. Or you can use the base of this script.

Public Garages

Place the garage according to your wishes by following the format below.

Private Garages

You can use a private garage for players who own a house or other.

Jobs Garages

Job Garages you can use for players who are on duty.

Parameter

  • Label: string

    • Garage Label.

  • Type: string

    • Vehicle type.

  • MaxVehicle: number

    • Max vehicle parking in this garage,

  • Blips: boolean

    • Show or hide blip garage.

  • Players: boolean or table

    • Boolean: you can set false if this garage not private.

    • Table: you can enter identifier or citizenid players.

  • Jobs: boolean or table

    • Boolean: you can set false if this garage not for jobs.

    • Table: you can enter jobName if this garage for jobs.

  • Coords: vector4

    • Coords for garage blips and spawn peds.

  • SpawnPoint: table

    • Spawn vehicles place. Use vector4.

  • DeletePoint: table

    • Pos: vector3

      • Coords for delete point.

    • Size: vector3

      • Size for delete point.

    • Rotation: number

      • Rotation for delete point

To create DeletePoint you need to use PolyZone to make it easier.

If you already have a garage script. customize the garageName with the existing one.

🛠️ Step 5: Setup Impounds


Public Impound

Public Impound, this is usually used when the player loses their vehicle. They can take out their vehicle here.

Jobs Impound

Impound jobs are used to retrieve vehicles impounded by impound jobs.

Parameter

  • Label: string

    • Garage Label.

  • Type: string

    • Vehicle type.

  • Blips: boolean

    • Show or hide blip garage.

  • Jobs: boolean or table

    • Boolean: you can set false if this garage not for jobs.

    • Table: you can enter jobName if this garage for jobs.

  • Coords: vector4

    • Coords for garage blips and spawn peds.

  • SpawnPoint: table

    • Spawn vehicles place. Use vector4.

🛠️ Step 6: Start the resouce


If everything is set up according to your server. You can start this kc_garagev2

  • Go to server.cfg and replace ensure kc_garagev2

  • Restart your server

Last updated