v1.2.0-beta.1
Pre-release
This is the fuel business in full, but it has not been through a season of live play yet. The mechanics work; the numbers behind them (prices, wear rates, delivery pay) are first drafts and are meant to be tuned on your own server. Run it on a test server before it touches a live one.
Fuel stations stop being blip coordinates and become businesses: they can be bought, staffed, priced, supplied and worn out. See Fuel business for the whole picture.
Requires
- New dependency oxmysql. Nine tables are created and seeded automatically on first start, no SQL file to import.
- One line in your
server.cfgso group permissions work, covering every MSK script at once:add_ace resource.msk_core command.add_ace allow
Added
Stations as entities
- All 30 map stations became named entities with a zone (center plus radius), their own stock and, once bought, an owner. The server resolves the station from the pump position, so no pump had to be re-mapped
- Blips carry the station name and update live when a station is renamed
Economy
- Stock per station per fuel type; an empty tank blocks that fuel type
- Price per liter per station, dynamic or fixed, clamped to admin limits
- Market tick: the server-wide base price moves with total demand across all stations and eases back toward its anchor in quiet hours
- Company account per station plus a full transaction log
Ownership
- Buying a station at the pump, selling it back for a configurable share of the purchase price plus whatever is on the company account
- Owner dashboard with eight tabs
Staff
- Ranks per station with salary, delivery bonus and seven permissions
- Employees hired from the list of online players, with their own dashboard showing only what their rank allows
- Salaries paid out of the company account to everyone online
Supply
- NPC driver, unlocked once per station, for instant restocking at a surcharge, plus optional automatic restocking
- Delivery runs with three rigs (van 500 L, truck 1500 L, tanker 3000 L), a fuel depot to drive to, and crash damage spilling up to 30 percent of the cargo
- Public delivery jobs at unowned stations, paid per delivered liter
Maintenance
- Pumps wear out with use: worn pumps fuel slower, broken ones stop working. A pump enters the register the first time somebody fuels at it, so nothing has to be mapped
- Mechanic on staff, repairs worn pumps automatically
Administration
- In-game admin dashboard (
/fueladmin) with station CRUD, stock, prices, market parameters, unowned-station settings, live theming and a nine-right permission matrix
Changed
msk_fuel:payFuelPricecarries the fuel type and the pump coordinates. The server determines the station, charges the station price, takes the liters out of its tank and books the revenue- Buying and refilling a petrolcan takes petrol out of the station tank as well
- The station zone radius replaces
Config.FuelStationZoneDistance, andConfig.Refill.priceis only a fallback for pumps outside every station - Server files are listed explicitly in
fxmanifest.luainstead of globbed, because the admin boot file has to load last
Fixed
- The custom fuel pumps from
Config.CustomFuelStationsonly spawned when blips were enabled - The version checker crashed on any version carrying a pre-release tag
- Settings introduced by a later version never reached a server that had already been seeded
Security
- Every owner and admin action is checked against the station the player is actually standing at, resolved from the pump coordinates
- The delivery flow is checked at every step and the reported crash leak is clamped: a manipulated client can only deliver less than it paid for
- Handing out rank permissions and selling a station are owner-only
- Deposits take the money before booking it, withdrawals book before paying out
Changed files
fxmanifest.lua
config.lua
config.business.lua (new)
config.stations.lua (new)
translation.lua
.gitignore
.github/workflows/release.yml
shared/perms.lua (new)
server/main.lua
server/functions.lua
server/versionchecker.lua
server/business/ (new)
stations.lua pricing.lua stock.lua account.lua
employees.lua ownership.lua payroll.lua supply.lua
delivery.lua maintenance.lua owner_api.lua
server/admin/ (new)
store.lua permissions.lua seed.lua api.lua command.lua boot.lua
client/main.lua
client/target.lua
client/fuel.lua
client/business/ (new)
sync.lua dashboard.lua delivery.lua
client/admin/ (new)
main.lua nui.lua
web/** (new NUI source)
html/** (new build output)