LegacyFuel Issues (ESX Based)

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

Ask in the main post for legacyFule
Just a link to help you get back to the main post to ask in [Release] [ESX & Non-ESX] LegacyFuel system

@Dev_Rocket I have done, lets see if I get a response…
Thanks for your help mate.

1 Like

Not a problem it may take time but no need to make a new post for something what is already out

Please do not create new topics for support/questions related to existing resources.

Only ask questions or request support in the original resource topic, or on whatever site/page you got the resource from (for example: create an issue on the GitHub page of the resource that you downloaded).

That way the original resource creator will get a notification and be able to help properly. This also helps to reduce duplicate topics of the same issue, because everything will be inside the original topic, allowing everyone to see all issues and solutions in one place.

Thanks for keeping the forums tidy.

:mascot: