MeZo
ScriptsESX🔓 Open sourceFree

Ox Fuel

Simplistic fuel resource meant for use with ox_inventory

Description

ox_fuel Basic fuel resource and alternative to LegacyFuel, meant for use with ox_inventory. Get vehicle fuel level This is an incredibly complicated task for some people, and they often ask for exports to do it. You use the native function GetVehicleFuelLevel (https://docs.fivem.net/natives/?_0x5F739BB8), or you can use a statebag. ```lua Entity(entity).state.fuel ``` Set vehicle fuel level ```lua Entity(entity).state.fuel = fuelAmount ``` setPaymentMethod (server) Replaces the standard payment method using "money" as an item. ```lua exports.ox_fuel:setPaymentMethod(function(playerId, amount) local xPlayer = ESX.GetPlayerFromId(playerId) local bankAmount = xPlayer.getAccount('bank').money if bankAmount >= amount then xPlayer.removeAccountMoney('bank', amount) return true end TriggerClientEvent('ox_lib:notify', source, { type = 'error', description = locale('not_enough_money', amount - bankAmount) }) end) ``` setMoneyCheck (client) Replaces the standard inventory search for "money". ```lua exports.ox_fuel:setMoneyCheck(function() local accounts = ESX.GetPlayerData().accounts for i = 1, #accounts do if accounts[i].name == 'bank' then return accounts[i].money end end return 0 end) ``` Šaltinis (GitHub): https://github.com/overextended/ox_fuel Licencija: GPL-3.0 · ⭐ 84 GitHub žvaigždučių. Autoriai — repozitorijos kūrėjai; MeZo Klubas tik pateikia nuorodą į oficialų šaltinį.

Version history

  1. v1.5.4Latest22 November 2026

    Code Refactoring • support strict states (Linden (https://github.com/overextended/ox_fuel/commit/85fb9baacdc9380bb31649296128ae2b41325d4d)) Continuous Integration • release: update actor_id (Linden (https://github.com/overextended/ox_fuel/commit/45866eb31a5852150257be81123b9b88a998efb4)) Chores • luarc template (Linden (https://github.com/overextended/ox_fuel/commit/35a4092fd7366b96a68e74409145561ee0ae0602))

Reviews

Sign in with Discord to leave a review.

No reviews yet. Be the first!

Similar resources

👑 VIP membershipMeZo