[Release] FRFuel [v1.7.0]

On my server it take 5 min to fill up a tank on every car

Must be something wrong on your end. Even with an empty tank, most it has taken me is about 20 seconds.

it is for everyone on the server

Could be another script on your server interfering with it.

True could be but i will see

@Leavaris
Works perfectly thank you.

New, v1.0.0, release has been drafted, see Changelog section for, well, changelog.

1 Like

thank you, that was all we need. But if you can add a cost option directly in this script ([Release] FRFuel [v1.7.0]) this will be good for the community :wink: thanks for yout job

thx a lot !
-Added config file, so creation of blips and/or pick-ups is now could be turned off

When I set false in the config file for the creation of blips, gaz station don’t work I did something wrong ?

Hotfix has been released. Thanks for reporting @Xantid .

Your more then welcome to add my post directly if you want. I’m just glad to give a little back.

Hi mate, first of all thanks for your work, the community really apreciate.

I wanted to ask you, i got a problem with the compilation of the source code. I tried to generate the source code in VS but when i launch it on my server it doesn’t work, i didn’t change anything in the code, and i added Citizen files for the compilation. I know i did something wrong but i don’t know where. If you have a little amount of time can i PM you to see if you can help me ?

Thanks !

How can we stop the DEBUG text from showing when filling up
https://gyazo.com/3e06d9a39ad9b1d6adbc7391c8f6bb17

and how to stop it choosing a random amount when filling up, i want to set it to $10 per litre but it charges anywhere from $80-$130 per litre.
thanks.

@Manny Your issue has nothing to do with FRFuel mod, please, ask server owner about it.

the “server” is run from my pc, i installed this script and it works apart from that debug message so thought i would ask here.

@Manny Apparently you’re using script provided by @Leavaris as FRFuel itself never sends any messages to chat.

You are using the reverse key to have the stopping effect. However, the reverse key “press” is really awkward when you get down to 5% fuel or less (Guess). Usually this is fixed when you exit and re-enter the car.

Would it make a difference if you use the handbrake function instead of the reverse function?

That, or cancel the drop the forward key input and resume if the key is pressed?

1 Like

This mod doesn’t modify default vehicle behaviour. The way car behave when fuel level goes lower than 10 is the original behaviour made by Rockstar.

Recommended update:
Add option for money consumed per half second of refill to give server owners the ability to make gas cost money

System.Thread.Timer start when space is pressed and stopped when space is released, then money removed when player starts engine?

The functionality to hook into how much gas was added is already there, so whenever space is released you can multiply your desired fuel cost by how much was added. No need to make it available every half second of refill for that example, although it would be nice to have some extra hooks available, like knowing how much fuel is required to fill up, or a way to stop refilling if the player doesn’t have enough money.

There’s a server and client event called “fuelAdded” you can tap into as the author mentioned. For example, I used it like this in a server script (untested):

-- fuel events
AddEventHandler('frfuel:fuelAdded', function(fuelAmount)
	TriggerEvent('es:getPlayerFromId', source, function(user)
		local cost = fuelAmount * fuelCost
		user:removeMoney(cost)
		TriggerClientEvent('capn:paidForFuel', source, cost)
	end)
end)