[Release] [ESX & Non-ESX] LegacyFuel system

Getting this error

Install it without making any changes

1 Like

is there any way of making you pay for it when you have money in the bank, like pretend card rather then having cash on you,
having some issue with this,
he normal version works, but not the ESX_ version with the cash side

just change the line so it check for bank money insted of pocket money ?

any idea where i would find that in heremain.lua (20.2 KB)

So I press G to fuel the car with the jerry can but it does not fuel at all.

they stated jerry cans are not added yet i belive

How do i do that? because ive tried and cannot figure it out

I need help by this http://prntscr.com/l5phok this is not working

what sline is that mate,

Looks good, works fine.

What lines removes the speed? And which line adjust fuel hud position?

Anyone have a link to the fuel truck and a ymap that has gas pumps for boats and aircraft?

Where did you find it? Can you link it?

I noticed on your server you also have faster cars than normal on vanilla cars howd you do that was it a certain script ?

Hey Guys!

Can you Provide some help with another script I am having an issue with, this time its LegacyFuel, This time I can provide a little more detail. When a Player pulls up at a gas station (Fuel Pump) and leaves the vehicle the Box that says “Press G to fuel car” pops up over said pump the server then begins to spam the follow error code:

Error running system event handling function for resource LegacyFuel: citizen:/s
cripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:52: att
empt to index a nil value (global 'ESX')
stack traceback:
        server/main.lua:52: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scriptin
g/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scriptin
g/lua/scheduler.lua:138>

Code from Server Sided script lines 50-56:


RegisterServerEvent('LegacyFuel:CheckCashOnHand')
AddEventHandler('LegacyFuel:CheckCashOnHand', function()
	local xPlayer = ESX.GetPlayerFromId(_source)
	local cb 	  = xPlayer.getMoney()

	TriggerClientEvent('LegacyFuel:RecieveCashOnHand', source, cb)
end)

Printscreens:

Console:
3c8df3a7ea87a4294795f1d62ca6d453

script:
ca49fe6393a7157e67257ed717c1070c

Any help would be great

Thanks
~ Mystical

1 Like

Do you use esx? If you do, make sure you start esx_legacyfuel after es_extended. If you don’t use esx, don’t use esx_legacyfuel, but instead LegacyFuel.

@InZidiuZ what line changes how close you have to be to activate the fuel pump? I wanted to make it just a little broader so you don’t have to get so close to the pumps.

Hey InZldiUZ,

Yes I am using ESX but My es_extended is well before esx_legacyfuel… es_extended Is one of the first things to start the fuel script is one of the last things to load.

If you have any other ideas or would like to take a look at what happens in game private message me and Id be happy to show you!

Thanks!

mine worked fine.
20characters