Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
### About
Started off as my first script, and for whatever reason, I decided to release it. As it was pretty badly created, I felt like I should rewrite it and make a better version, so ended up spending a few hours doing so.
My Forked version of LegacyFuel all rights belong to the owner.
this is my version and its NUI based
![image](https://user-images.githubusercontent.com/82306584/134341351-46b14e43-986a-4f26-9e7b-37eac8516f1e.png)

### Installation
1) Download the latest version in the "code" tab on GitHub.
2) Drag & drop the folder into your `resources` server folder.
3) Configure the config file to your liking.
4) Add `start LegacyFuel` to your server config.

### Exports
There are currently two (client-sided) exports available, which should help you control the fuel level for vehicles whenever needed.

```
SetFuel(vehicle --[[ Vehicle ]], value --[[ Number: (0-100) ]])
GetFuel(vehicle --[[ Vehicle ]]) -- Returns the vehicle's fuel level.
```

**Example usage:**
```
function SpawnVehicle(modelHash)
local vehicle = CreateVehicle(modelHash, coords.x, coords.y, coords.z, true, false)

exports["LegacyFuel"]:SetFuel(vehicle, 100)
end

function StoreVehicleInGarage(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
local fuelLevel = exports["LegacyFuel"]:GetFuel(vehicle)

TriggerServerEvent('vehiclesStored', plate, fuelLevel)
end
```
4) Add `start renzu_fuel` to your server config.
Loading