Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
InZidiuZ committed May 8, 2019
1 parent 39eec6f commit 4233ef8
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
I'll do this later... Too lazy right now.
### About
Started off as my first script, and for whatever reason, I decided to release the disguisting pile of shit. Felt bad after some time for leaving so many people with this horror of a script, so ended up spending a few hours rewriting it, so here you go. (:

### Installation
1) Download the latest version in the "code" tab on GitHub.
2) Drag & drop the folder in 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 exports available, which should help you control the fuel level for vehicles whenever needed.

```
SetFuel(--[[Vehicle--]] vehicle, --[[Int--]] value)
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, fuel)
end
```

0 comments on commit 4233ef8

Please sign in to comment.