Documentation

Setup

Various steps to ensure our script works on your server.

#In-depth Guide

You just downloaded our resources and wondering where to get started? This is for you. We will instruct you on how to get it set up for all different types of servers.

#Good To Know

#Vehicle Key Provider

Starting with Garages 2.6.0, vehicle keys are handled by a separate provider. Garages supports zyke_vehiclekeys, qb-vehiclekeys, qbx_vehiclekeys, qs-vehiclekeys, and wasabi_carlock.

The key provider must start before Garages. Do not run two key systems at the same time.

#Default Garage

If you are initializing vehicles without any garages set up, the default garage will become a random one, or none at all since one could not be found. Make sure to set up your garages in the garage builder and your default garage to avoid having to transfer your vehicles later down the line.

#Basic Setup

To get started, you will need to have completed at least these listed steps. It is very much recommended to read the rest of the page to ensure the resource runs smooth on your server.

All of our databases queries are automatically executed the first time you run the script, along with repairs if needed when you start it in the future.

#Dependencies

First, make sure to download all dependencies. It is also important that you follow a proper starting sequence, you can use our guide (Resource Starting Sequence) if you are uncertain.

#Select a Key Provider

Set vehicleKeys in zyke_lib/dependency_override.lua:

lua
vehicleKeys = "zyke_vehiclekeys",

Use the real resource name for another supported provider. auto can detect a running provider, but an explicit value avoids ambiguity.

Start the provider before Garages:

cfg
ensure zyke_vehiclekeys
ensure zyke_garages

Read Vehicle Key Providers and the Vehicle Keys integration guide for the supported behavior.

#Items

Go into zyke_garages/extras/items and add the license plate and vehicle transfer contract items for your inventory. You can find images in zyke_garages/extras/items/images.

Vehicle key, lockpick, and hotwire items belong to the selected key resource. When using Vehicle Keys, install them from zyke_vehiclekeys/extras/items.

#Vehicle Migration (Optional)

There's a few steps to this, but they're all recommended. Note that you only need to migrate existing owned vehicles. If you have a fresh server, you can skip this step.

First, you should run this command to initialize the default vehicles. This will insert the needed data into all base GTA vehicles that we recorded, which is ~800. This is instant.

Next up are your custom vehicles. We can't pre-seed this data for you, so a one-time migration is needed. You run this command, and it will go through your vehicle list, spawn in the vehicle, grab the vehicles and insert it into your database. You can see a demo video here: Initialization Showcase (500 Random Vehicles, 18.2s) - Slightly outdated, now even faster! Does depend on your system performance, though.

For those that are technical, we fetch & store certain values that are not available on the server-side instead of having to fetch them in real time or every time the server starts. This is a one time thing for migrations if you previously had vehicles.

#Logging (Optional)

If you want to add Discord logs to certain actions, you can set your webhook here.

Via zyke_lib you can adjust your logging technique to anything, but only works with Discord by default.

#Good To Know

We strongly recommend you read the rest of this page to avoid any issues.