v3.0.7 patch
Server-side refuelling, SetFuel server export and a safer database
13changes

Server-side refuelling, SetFuel server export and a safer database
13changes

[02] Release
A security and stability update. Refuelling, jerrycans and the tanker job are now settled on the server with rate limits, garages and mechanics can set fuel with a new server export, fuel set by other scripts is no longer reverted, and the SQL file no longer wipes your stations.
level and radius columns of fuel_stations migrate on their own from FLOAT to DECIMAL. sql/database.sql no longer contains DROP TABLE, so importing it again keeps your stations and settings.client/custom/framework/*.lua and server/custom/framework/*.lua changed (safer money handling, job cleanup on logout). Copy your own edits onto the new files instead of keeping the old ones.config.lua: Config.DefaultFuelCapacity, Config.DefaultBatteryCapacity, Config.VehicleCapacities and Config.RandomFuel. Without them the script uses 65 L / 65 kWh and spawns vehicles with up to 100% fuel.fxmanifest.lua now enables use_experimental_fxv2_oal. Replace the whole manifest.exports['qs-fuelstations']:SetFuel(netIdOrEntity, level) -- level 0-100
Replace every file in the resource, except what you edited yourself:
qs-fuelstations/fxmanifest.lua, qs-fuelstations/config.lua, qs-fuelstations/CHANGELOG.mdqs-fuelstations/sql/database.sqlqs-fuelstations/utils/utils.luaqs-fuelstations/client/main.luaqs-fuelstations/client/custom/framework/esx.lua, qb.lua, vrpex.luaqs-fuelstations/client/custom/vehiclekeys/glfp10_carkeys.luaqs-fuelstations/client/modules/consumption.lua, creator.lua, creator_camera.lua, fuel.lua, job.lua, pump.lua, raycast.lua, scaleform.lua, stations.luaqs-fuelstations/server/main.luaqs-fuelstations/server/custom/framework/esx.lua, qb.lua, vrpex.luaqs-fuelstations/server/modules/job.lua, job_levels.lua, market.lua, settings.lua, stations.luaqs-fuelstations/server/modules/db.lua, selfcheck.lua, throttle.lua — newThe server checks the player's distance, and if something fails halfway the station stock and the money are restored.
Per player and per station, so spamming them or running two at once no longer duplicates money or stock.
exports['qs-fuelstations']:SetFuel(netIdOrEntity, level), with level from 0 to 100.
Change the defaults with Config.DefaultFuelCapacity and Config.DefaultBatteryCapacity, and set a size per model in Config.VehicleCapacities (20-200).
sql/database.sql no longer drops any table, and the station level and radius columns migrate from FLOAT to DECIMAL on their own on first start.
Safer money handling, and the delivery job is cleaned up when a player logs out.
Garages, repair kits and other scripts saw their value overwritten. The client SetFuel export now goes through a validated server event, so the value sticks.
The starting level now follows Config.RandomFuel.