> For the complete documentation index, see [llms.txt](https://vt-developmets.gitbook.io/vt-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vt-developmets.gitbook.io/vt-scripts/our-scripts/our-paid-scripts-qb/fuel/how-to-install.md).

# How to Install

This page will give you a brief overlook on how to install this resource

{% hint style="warning" %}
Make sure to follow all steps, step by step, if you encounter errors please recheck that you've completed step 1-3 correctly.
{% endhint %}

{% stepper %}
{% step %}

### Remove old resources

1. Remove `LegacyFuel` or any other **Fuel Script** you used prior
2. Insert `vt-fuel` into your server
3. Remember to `еnsure vt-fuel` in your **server.cfg**
   {% endstep %}

{% step %}

### **Run the resource before all resources in server.cfg**

```lua
# These resources will start by default.
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure baseevents

# QBCore & Extra stuff
ensure qb-core
ensure vt-fuel
```

{% endstep %}

{% step %}

### Change resource names

1. Open your Entire server in **Visual Studio Code**
2. Now do a folder search for **LegacyFuel** (*Or any other fuel script you used prior)*
3. Now Replace it with <mark style="color:red;">**vt-fuel**</mark>

#### **An example**

```lua
exports['LegacyFuel']:SetFuel(veh, vehicle.fuel)
```

#### **You do it this way**

```lua
exports['vt-fuel']:SetFuel(veh, vehicle.fuel
```

{% endstep %}

{% step %}

### Add jerrycan(Optional)

{% hint style="warning" %}

#### This is not working properly yet but will be added in the next update!

{% endhint %}

1. Head over to your qb-core folder inside your resources
2. Here headover to the shared folder and find items.lua
3. Paste following code whereever you like within the QBCore.Shared table

<pre><code><strong>--#vt-fuel Jerrycan (QBCore old Inventory)
</strong>["jerrycan"]				 	 = {["name"] = "jerrycan", 						["label"] = "Jerry Can", 				["weight"] = 15000, 	["type"] = "item", 		["image"] = "jerrycan.png", 			["unique"] = true, 		["useable"] = true, 	["shouldClose"] = true,   ["combinable"] = nil,   ["description"] = "Petrol can to fill your car"},
</code></pre>

1. Find your inventory in case of qb-inventory
2. Open up folder html/js and find app.js
3. This can be done in lj/ps/qb or whatever you use in this case

* [x] **Find**&#x20;

```javascript
} else if (itemData.name == "harness") {
```

* [x] **Replace it with this**

```javascript
 } else if (itemData.name == "jerrycan") {
            $(".item-info-title").html("<p>" + itemData.label + "</p>");
            $(".item-info-description").html(
                "<p>" + "Petrol can to fill your car <br><br>" + itemData.info.gasamount + " Liters Inside.</p>" +
                "</span></p><p style=\"padding-top: .8vh;font-size:11px\"><b>Weight: </b>" + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + " | <b>Amount: </b> " + itemData.amount
            );
        } else if (itemData.name == "harness") {
        
```

{% endstep %}

{% step %}
{% hint style="success" %}
Special thanks to <mark style="color:orange;">**Law♆#4585**</mark> for the jerrycan help, he also used some new ps inspired animations in the code. I am grateful to him for helping me and canceling me in fixing some problems and improvements with the resource because I didn't have enough time!
{% endhint %}
{% endstep %}
{% endstepper %}
