diff --git a/README.md b/README.md index 379a93f..23dee9a 100644 --- a/README.md +++ b/README.md @@ -1 +1,32 @@ -I'll do this later... Too lazy right now. \ No newline at end of file +### 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 +```