# Setup

## Installation

Follow the instructions below to run the `gusti-givevehicle` script on your server

* Extract file
* Copy / cut `gusti-givevehicle` into your server's `resources` folder
* Open `server.cfg`
* Add the `gusti-givevehicle` script by ensure `gusti-givevehicle` in `server.cfg`
* Restart server
* Finished
* Now you can enjoy the features of the `gusti-givevehicle` script on your server

{% hint style="info" %}
Before running the gusti-givevehicle script, please pay attention to the dependencies section!
{% endhint %}

## Configuration

<pre class="language-lua"><code class="lang-lua"><strong>Config = {}
</strong>
Config.CheckForUpdates = true -- check for update available?

-- Language
Config.Locale = GetConvar('esx:locale', 'en') -- en / id

-- Notification
Config.Notify = 'ox_lib' -- 'mythic_notify', 'ox_lib', 'ESX'

-- Do you want to enable a message to the player that he got a vehicle?
Config.EnableReceivingMessages = true

-- Who can access the give vehicle menu?
Config.isAdmin = {
  "steam:xxxxxxxxxxxxxxx" -- steam / license
}

-- looks like this: 'LLL NNN'
-- The maximum plate length is 8 chars (including spaces &#x26; symbols), don't go past it!
Config.PlateLetters  = 3
Config.PlateNumbers  = 3
Config.PlateUseSpace = true

-- Inserting a vehicle into owned_vehicles
Config.GiveVehicleTogarage = {
  stored = 1, -- [1 = Garage] - [0 = Impound]
  parking = 'VespucciBoulevard' -- Which garage do you want to save to?
}

-- Configuration ['ox_lib'] Dialog Input
Config.MenuGiveVehicle = {
  PlayerID = {
    icon = 'fas fa-clipboard-user',
    required = true
  },
  VehicleModel = {
    icon = 'fas fa-car',
    required = true
  },
  VehiclePlate = {
    icon = 'fas fa-clipboard-question',
    required = false
  }
}

Config.MenuDeleteVehicle = {
  VehiclePlate = {
    icon = 'fas fa-clipboard-question',
    required = true
  }
}

-- Configure Alert Dialog for Give Vehicle
Config.AlertDialogGiveVehicle = {
  enable = true, -- true / false
  centered = true, -- centers the dialog vertically and horizontally
  cancel = true, -- displays a cancel button (ESC is still available if this is not defined)
  size = 'sm', -- size?: 'xs' or 'sm' or 'md' or 'lg' or 'xl'
  labels = { -- Allows you to define the displayed labels for cancel and/or confirm buttons.
    confirm = 'Give Vehicle',
    cancel = 'Cancel',
  }
}

-- Configure Alert Dialog for Delete Vehicle
Config.AlertDialogDeleteVehicle = {
  enable = true, -- true / false
  centered = true, -- centers the dialog vertically and horizontally
  cancel = true, -- displays a cancel button (ESC is still available if this is not defined)
  size = 'sm', -- size?: 'xs' or 'sm' or 'md' or 'lg' or 'xl'
  labels = { -- Allows you to define the displayed labels for cancel and/or confirm buttons.
    confirm = 'Delete Vehicle',
    cancel = 'Cancel',
  }
}
</code></pre>

## Dependency

* [es\_extended](https://github.com/esx-framework/esx_core)
* [oxmysql](https://github.com/overextended/oxmysql)
* [ox\_lib](https://github.com/overextended/ox_lib)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aklgaming.gitbook.io/documentation/gusti-resources/gusti-givevehicle/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
