> For the complete documentation index, see [llms.txt](https://devmosaic.gitbook.io/devmosaic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devmosaic.gitbook.io/devmosaic/resources/devmosaic-ox-fuel-rework/refuelling.md).

# Refuelling

The order a player does things in, and the limits they will run into.

### The Order

Refuelling always runs in the same order, and the interface only offers what is valid at that moment.

{% stepper %}
{% step %}

#### Take the nozzle

Stand at the pump and pick it up. The player holds it with a carry animation and the hose pulls out behind them.
{% endstep %}

{% step %}

#### Attach it to the vehicle

Walk to the car and attach. The nozzle seats into the real fuel cap.
{% endstep %}

{% step %}

#### Use the pump

Only now does the pump screen become available. Choose an amount, pick a grade, and start.
{% endstep %}

{% step %}

#### Put it back

Remove the nozzle from the vehicle, walk back, and return it to its holder. The pump goes idle.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**The screen is not available until the nozzle is in a vehicle.** This is deliberate - there is nothing to show before then - but it surprises people who expect to set an amount first.
{% endhint %}

### With A Targeting Resource

Five options, each appearing only when it applies. Works the same on ox\_target, qb-target and qtarget.

| Option                       | Appears on           | Available when                                                                   |
| ---------------------------- | -------------------- | -------------------------------------------------------------------------------- |
| **Pick up / return nozzle**  | The pump             | On foot, holding nothing - or holding this pump's nozzle and ready to return it. |
| **Insert nozzle**            | Any vehicle          | Carrying the nozzle, with that vehicle in reach.                                 |
| **Use pump**                 | The pump             | Only after the nozzle is seated in a vehicle.                                    |
| **Remove nozzle**            | The fuelling vehicle | The nozzle is in it and filling has stopped.                                     |
| **Buy or refill a fuel can** | The pump             | On foot with no nozzle in hand.                                                  |

### With Keys

| Key          | Does                                                                    |
| ------------ | ----------------------------------------------------------------------- |
| <kbd>E</kbd> | Pick up or return the nozzle. Only registered when `ox_target = false`. |
| <kbd>G</kbd> | Attach or remove the nozzle at a vehicle. Always registered.            |
| <kbd>H</kbd> | Open the pump screen. Always registered.                                |
| `/fuelcan`   | Buy or refill a petrol can.                                             |

Players can rebind <kbd>G</kbd> and <kbd>H</kbd> under **Settings > Key Bindings > FiveM**.

### On The Screen

| Input                            | Does                                        |
| -------------------------------- | ------------------------------------------- |
| Mouse                            | Move the cursor on the pump face and click. |
| Scroll wheel                     | Raise or lower the amount.                  |
| <kbd>Left</kbd> <kbd>Right</kbd> | Adjust the amount in 5% steps.              |
| <kbd>Enter</kbd>                 | Start or stop filling.                      |
| <kbd>Esc</kbd>                   | Leave the screen. Filling carries on.       |

### Limits

These exist so the hose cannot be abused, and players will meet them.

| Limit                     | What happens                                                                                           |
| ------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Hose reach**            | Walk past `attachedHoseReach` and after `reachGraceMs` the hose pulls loose with a notification.       |
| **Vehicle movement**      | Move the vehicle more than half a metre after attaching and the hose disconnects immediately.          |
| **One player per nozzle** | A nozzle in use is locked server-side. A second player is told it is already taken.                    |
| **Two nozzles per pump**  | Most pumps have two, so a second player can use the other side. The vintage and `old3` pumps have one. |
| **Damaged pumps**         | A pump caught in an explosion stops working until the resource restarts.                               |
