I want to add billing to my esx_ambulancejob, but i Dont no WHO. Anyone can help me?
Open esx_ambulancejob/client/job.lua , then find line 53, add this ,
then find 165-168 and add this code
elseif data.current.value == 'billing' then
esx.UI.Menu.Open('dialog', GetCurrentResourceName(), 'billing', {
title = _U('ems_menu')
}, function(data, menu)
local amount = tonumber(data.value)
if amount == nil or amount < 0 then
esx.ShowNotification(_U('invalid_amount'))
else
local closestPlayer, closestDistance = esx.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
esx.ShowNotification(_U('no_players'))
else
menu.close()
TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_ambulance', _U('ambulance'), amount)
end
end
end, function(data, menu)
menu.close()
end)
Your welcome
1 Like
I have an error: cannot load client/job.lua
Please screenshot the error
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.