mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
40 lines
877 B
Plaintext
40 lines
877 B
Plaintext
import { Steps } from 'nextra-theme-docs';
|
|
import ResourceLinks from '@components/resource-links';
|
|
|
|
<ResourceLinks repo="https://github.com/overextended/ox_fuel" />
|
|
|
|
A simple fuel resource meant to replace LegacyFuel or serve as a showcase for using petrol cans as an item.
|
|
|
|
## Installation
|
|
|
|
<Steps>
|
|
### Install all resource dependencies.
|
|
- [ox_lib](../ox_lib/)
|
|
- [ox_inventory](../ox_inventory/)
|
|
|
|
### Download a [release](https://github.com/overextended/ox_fuel/releases) or clone the source code.
|
|
|
|
```bash
|
|
git clone https://github.com/overextended/ox_fuel.git
|
|
```
|
|
|
|
### Install optional dependencies.
|
|
|
|
These resources aren't required but provide additional functionality.
|
|
|
|
- [ox_target](../ox_target/)
|
|
|
|
</Steps>
|
|
|
|
## Get vehicle fuel amount
|
|
|
|
```lua
|
|
local fuel = Entity(vehicleId).state.fuel
|
|
```
|
|
|
|
## Set vehicle fuel amount
|
|
|
|
```lua
|
|
Entity(vehicleId).state.fuel = fuelAmount
|
|
```
|