
CodeM xFuel V2 - Physical Fuel System with In-World Pump Screens, EV Charging and Jerry Cans
Codem xFuel V2 replaces your fuel script with a fully physical refuelling experience. Players take the nozzle off the pump, walk the hose to the filler cap, choose a grade and pay on a touch screen drawn directly on the pump - no menus, no floating UI. Built from the ground up by CodeM for roleplay servers that want fueling to feel real.
FEATURES
- In-world pump touch screens - clickable screen rendered on the pump face, no NUI menu
- Full fueling flow on the screen - select grade, enter litres on the keypad or use 10 L / 20 L / FULL presets, pay by cash or card
- Live counters - litres and money count up as fuel flows (default 1.67 L per second)
- Two faces per pump - both sides of a pump work independently, two players can fuel at once
- Real-time sync - other players see the nozzle, hose and screen state of every pump
- Optimised screens - only pumps in use get a live screen (default 2), idle pumps share one, max 3 browser screens at once
- Physical nozzle and hose - take, insert and hang up the nozzle with G or target, visible hose (default 5 m)
- Hose limit - walk or drive too far and the nozzle snaps back onto the pump
- Filler cap positions tuned for 669 vehicle models - cars, trucks, bikes, boats, helicopters, planes and more
- Fueling animations - short take and hang-up animation, turn-to-filler insert animation
- 4 fuel grades - Regular 87 ($3.00/L), Mid Grade 89 ($3.25/L), Premium 93 ($3.50/L), Diesel ($3.10/L), all configurable
- Per-grade burn rate - Mid Grade lasts 10% longer, Premium lasts 20% longer
- Per-plate fuel memory - every vehicle remembers the grade it was last filled with, saved across restarts
- Grade switching - filling a different grade empties the tank first
- Wrong fuel engine seizure - petrol in a diesel or diesel in a petrol vehicle kills the engine about 5 seconds after it starts
- 50 diesel vehicle models listed by default - trucks, construction, buses, military and service vehicles
- Smart refunds - money for fuel that did not go in is returned when stopped early, the engine is started or the vehicle drives off (configurable)
- Offline refunds - players who disconnect mid-fuel are paid automatically on their next join
- Safety rules - engine must be off to pay, max vehicle distance (default 6 m), pump stops if the player walks away (default 15 m)
- Realistic consumption - fuel use by revs x vehicle class x grade burn, 11-step rev curve, values per class and per model
- Tank sizes per class - from 15 L motorcycles to 500 L planes (default 100 L), per-model overrides
- Fuel runs out - the engine stops at 0
- Vehicle blacklist - bicycles and listed models never use fuel
- Electric charging - 26 EV chargers spawned around the map with their own touch screen
- Charging flow - take the plug on a 7.5 m cable, choose speed, charge to 50 / 80 / 100% or a custom level in 5% steps
- 2 charge speeds - Fast ($2.5 per 1%, 1.6 s) and Normal ($1.8 per 1%, 4.0 s)
- 22 electric vehicles listed by default plus native EV detection on game build 3258 and newer
- EV safety - plugs only fit EVs, pump nozzles cannot go into EVs
- Jerry can - buy a 100 L can on the pump screen (default $300) with cash or card
- Pour into any vehicle - G or target at the filler cap, stops when the tank is full or the can is empty
- Inventory-safe fuel storage - litres kept in item metadata, works with any inventory supported by codem-lib
- Refill at the pump - set the can down at the pump, the nozzle goes in and you buy fuel on the screen
- Overflow - buy more than fits and fuel spills into a growing, flammable petrol puddle
- Classic dial pumps - vintage and old pumps get working dial counters for total sale, litres and price per litre
- Plug-in-and-fill - on classic pumps pick a grade from target, fueling starts automatically and you pay only for what went in
- Job discounts - on-duty discounts per job, flat or by rank (default police 90%, ambulance 80%)
- lc_gas_stations integration - owner prices, stock, sales income, balance entries, customer counters and refunds across 27 stations (optional)
- Per-grade and per-speed stock flags - disable any grade or charge speed at unowned pumps
- Map blips - 27 gas station blips and charger blips, nearest-only option
- 18 custom pumps - helipads, airport, marinas and airfields with a 14 m hose for aircraft and boats
- Fuel monitor chart - live fuel, speed and consumption lines (L/MIN or %/MIN for EVs) with /fuel_chart
- Chart controls - 15-180 s window, record toggle, draggable panel, F3 mouse focus (rebindable), settings remembered
- LegacyFuel drop-in replacement - provides LegacyFuel, existing GetFuel / SetFuel calls work without edits
- Client and server exports - GetFuel, SetFuel, GetFuelType, SetFuelType (by vehicle or plate)
- Fuel level synced on an entity state bag for any script to read
- ox_target and qb-target support - falls back to [E] and G prompts without a target resource
- Admin tools - /setfuel, /jerryfix, in-game screen tuner (/fuelpanel), nozzle tuner (/fuelnozzle) and model showcase (/fuelprops)
- Player commands - /fueltype shows the fuel a vehicle runs on
- 2 languages - English and Turkish, server.cfg override, easy to add more
- 1 database table - created and migrated automatically on start
- Escrow-ignored files - config, pump positions, vehicle filler offsets, locales and SQL are fully editable
- Full documentation on GitBook









