-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Description
Can you update the code so it can be QB-Core friendly?
LegacyFuel\source\fuel_client.lua ->
if Config.UseESX then
ESX = exports['es_extended']:getSharedObject()
end
LegacyFuel\source\fuel_server.lua ->
if Config.UseESX then
local ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterServerEvent('fuel:pay')
AddEventHandler('fuel:pay', function(price)
local xPlayer = ESX.GetPlayerFromId(source)
local amount = ESX.Math.Round(price)
if price > 0 then
xPlayer.removeMoney(amount)
end
end)
end
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels