[Release] FRFuel [v1.7.0]

Yeah, but the only issue is they overwrite the buttons that this mod assigns, so at gas stations you have to to /engine instead of just pressing a button.

I can turn off the car and refuel but i can’t turn it on weird help me

I know it’s been a while, but you can compile on Visual Studio 2015 by modifying that line to:

protected Vehicle LastVehicle { get { return lastVehicle; } set { lastVehicle = value; } }

Does anyone know how i can get the script to tell a player how much fuel they added to their vehicle after they get gas? kind of like DOJ. Is it integrated or is there a way, or some code that i could add to make it do that?

i need help scripting this in for my server please help

i figured it out

1.create a client.lua
2. add it to __resource.lua ex: client_script.lua
3rd. go into client.lua using notepadd++ or any other editor and add:

RegisterNetEvent('frfuel:fuelAdded')
AddEventHandler('frfuel:fuelAdded', function(amount)

    gallons = amount * 0.264172

    Wait(1500)
    TriggerEvent("chatMessage", "[GAS]", {255, 196, 0}, math.ceil(gallons).." gallons of gas pumped!")

end)

clear your cache
restart or do /restart frfuel
boom your done!

Do note if you do /restart frfuel then you dont need to clear your cache as it refreshes it.

2 Likes

also is there a way to make it compatible with a fuel tanker?

i would like for it to be more like a player notifcation but that will do thanks

i tried making it one but failed

--Edited by Toni Morton and Solarfantom

RegisterNetEvent('frfuel:fuelAdded')
AddEventHandler('frfuel:fuelAdded', function(amount)
    gallons = amount * 0.264172
    Wait(1500)
    SetNotificationTextEntry("STRING")
    AddTextComponentString("~o~[FUEL]~w~ Pumped " .. math.ceil(gallons) .. " gallons" )
    DrawNotification(false, true);
end)
1 Like

This one will send a player notfication on the lowerleft of the screen.

and how do u add it that would help for people that dont no how to add it

you just do like my instructions but replace the client.lua with that code

Is there any way to add so it costs money?

here’s the notification version: cl_frfuel.lua (353 Bytes)
__resource.lua (79 Bytes)

3 Likes

Do you honk your horn in real life to turn your car off? Do /engine

Do you have a /engine script in your server?

i figured out how to make the fuel refuel faster :slight_smile: frfuel.zip (16.0 KB)

there ya go if you want it (it also includes the doj notification at the bottom)

it also adds fuel to the helicopters :wink:

2 Likes

Thank you for leaving the credits :slight_smile:

1 Like

your welcome :wink:

(20charsSuck)

1 Like