Gas Stations
Set up player-owned fuel stations, staff access, stock deliveries, and pump pricing for Qbox.
Gas Stations turns fuel stops into player-run businesses. Owners set retail prices, manage stock, hire staff, and order supplies. Customers keep using the normal ox_fuel pump interactions while the business handles sales and stock behind the scenes.
What you need
- OneSync and Qbox (
qbx_core). ox_lib,oxmysql,ox_inventory, andqbx_vehiclekeys.ox_fuelfor customer fueling and can purchases.- The supplied
ox_fuelpricing integration for owner-controlled prices.
Keep the folder named rw_gasstations. The manifest name and some event/log names use the singular rw_gasstation; your ensure line still uses the actual folder name.
Install the resource
- Follow the shared installation steps.
- Set up the fuel integration below before enabling owner-controlled prices.
- Review the station locations in
shared/config.lua, pump positions inshared/pumps.lua, and owner terminals inshared/management.lua. - Start your Qbox/Ox dependencies and
ox_fuel, then addensure rw_gasstationstoserver.cfg. - Check the server console for database or fuel-bridge errors.
The resource creates the rw_gasstation database table on startup. No separate SQL import is supplied or needed for a normal first install.
Connect ox_fuel pricing
The supplied integration clients are based on ox_fuel 1.5.4. Back up your existing fuel resource, compare the files if you use a different version, and test the integration before opening it to players.
| Supplied file | Destination inside ox_fuel |
|---|---|
install/ox_fuel/server-pricing.lua | server-pricing.lua |
install/ox_fuel/client/pricing.lua | client/pricing.lua |
install/ox_fuel/client/init.lua | Replace client/init.lua after backing it up. |
install/ox_fuel/client/fuel.lua | Replace client/fuel.lua after backing it up. |
install/ox_fuel/client/target.lua | Replace client/target.lua after backing it up. |
Add the new server script to ox_fuel's manifest:
server_script 'server-pricing.lua'Make sure client/pricing.lua is included in the manifest's downloadable files list, either directly or through an existing matching wildcard. It is loaded as a module by the supplied clients.
Restart ox_fuel and rw_gasstations after these changes. The station resource attaches its payment and price providers at runtime. Missing price-provider support produces owner_pricing_unavailable, and attempts to change owner prices are rejected until the API is installed.
Keep the upstream fuel license and the supplied LICENSE and NOTICE.md with the modified integration files.
Give a station an owner
Use these commands in the server console. In-game use requires the matching command.<name> ACE permission.
| Command | What it does |
|---|---|
gasstations | Lists configured stations and their current owners. |
gasowner <station_id> <citizenid> | Assigns the station to a character. |
gasunowner <station_id> | Removes its owner. |
Use the character's citizen ID, not their temporary server/player ID. For example, replace YOUR_CITIZEN_ID below with a real character ID:
gasowner davis YOUR_CITIZEN_IDThe owner can press E at the outdoor owner terminal to manage the station. Administrator ownership changes preserve the station's assets, clear staff assignments, and take no payment from the player.
Run the business
Deposit business funds, review the fuel and can prices, and order stock when supplies run low. Paid orders need to be collected from the depot and delivered in the assigned supply truck; a timer alone does not fill the station.
Managers can handle prices, operations, stock orders, deliveries, reports, and alerts by default. Delivery drivers can handle deliveries. Withdrawal and staff-management permissions are separate—review them before giving an employee broader access.
Unowned, paused, or empty stations use fallback supplies and default prices. Those fallback sales do not earn revenue for the station owner.
Configuration files
| File | What it controls |
|---|---|
shared/config.lua | Stations, accounts, prices, stock capacities, upgrades, and purchase limits. |
shared/pumps.lua | Actual pump coordinates used to validate customer proximity. |
shared/management.lua | Owner terminal positions and management interaction distance. |
shared/deliveries.lua | Supply depot, truck, loading/unloading, travel limits, and order quantities. |
shared/staff.lua | Default staff roles, permissions, employee limits, and driver pay validation. |
shared/tax.lua | Sales-tax defaults and validation. |
shared/interactions.lua | Legacy interaction settings and low-stock defaults. Customer prompts now belong to ox_fuel. |
Tune your economy
| Setting | Shipped default | What it means |
|---|---|---|
Account | bank | Player account used for business transactions. |
MaxOwned | 3 | Maximum stations a player can own. |
DefaultFuelPrice | 5 | Fallback game-dollar price per liter. |
DefaultCanPrice | 150 | Fallback price for a new fuel can. |
PriceLimits | Fuel 1–25; cans 50–1000 | Owner retail-price bounds. |
Wholesale | Fuel 2; cans 60 | Stock cost per liter or can. |
SalesTaxPercent | 10 | Tax included in stocked retail sales, removed from circulation. |
DriverPayPerDelivery | 250 | Staff delivery pay; 0 disables it. |
BaseCapacity | 10,000 liters; 100 cans | Initial storage capacity. |
InitialStock | 2,500 liters; 20 cans | Stock for newly initialized station records. |
Upgrades | Tank and shelf upgrades | Upgrade costs, capacity additions, and maximum levels. |
Edit station and pump coordinates together when moving a business. Changing an owner terminal alone does not move its customer pumps.
If something isn't working
Owner prices won't save: check the pricing API installation and the owner_pricing_unavailable log message.
The owner can't open management: check their citizen ID, assigned station, and owner-terminal position. Customers use pumps; owners use the management marker.
Stock never arrives: check the paid order's delivery stage. Collect it at the depot and complete the truck run and unload interaction.
Customers can fuel but the owner earns nothing: check ownership, business status, and stock. Fallback supply keeps fueling available without owner revenue.
Custom-map pumps don't work: update shared/pumps.lua and check the configured customer and pump distances against your actual pump locations.

