# RHD Garage

{% hint style="info" %}

#### Follow the garage installation method so that there are no mistakes

{% endhint %}

## Installation

***

1. #### Install the dependencys
2. #### Extract rhd\_garage into your resources
3. #### Run the SQL provided in the SQL folder

{% hint style="warning" %}
If you use QB-Phone then you have to change several codes as below
{% endhint %}

<details>

<summary>QB-Phone</summary>

* Original

<pre class="language-lua" data-title="client/main.lua"><code class="lang-lua"><strong>-- line 302
</strong><strong>PhoneData.GarageVehicles = exports.rhd_garage:getvehForPhone()
</strong></code></pre>

<pre class="language-lua" data-title="client/main.lua"><code class="lang-lua"><strong>-- line 860
</strong><strong>RegisterNUICallback('track-vehicle', function(data, cb)
</strong>    local veh = data.veh
    local success = exports.rhd_garage:trackveh(veh.plate, veh.garage)
    if success and not veh.disableTracking then
        QBCore.Functions.Notify("Your vehicle has been marked", "success")
    else
        QBCore.Functions.Notify("This vehicle cannot be located", "error")
    end
    cb("ok")
end)
</code></pre>

* Renewed-Scripts

{% code title="client/garage.lua" %}

```lua
-- line 21
RegisterNUICallback('SetupGarageVehicles', function(_, cb)
    vehicles = exports.rhd_garage:getvehForPhone()
end)
```

{% endcode %}

{% code title="client/garage.lua" %}

```lua
-- line 27
RegisterNUICallback('gps-vehicle-garage', function(data, cb)
    local veh = data.veh
    local success = exports.rhd_garage:trackveh(veh.plate, veh.garage)
    if success and not veh.disableTracking then
        QBCore.Functions.Notify("Your vehicle has been marked", "success")
    else
        QBCore.Functions.Notify("This vehicle cannot be located", "error")
    end
    cb("ok")
end)
```

{% endcode %}

</details>

4. #### Start rhd\_garage in server.cfg


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://rhd-script.gitbook.io/rhd-scripts/free-scripts/rhd-garage.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.
