hello i need help with this code
RegisterServerEvent('esx_jobcenter:bono')
AddEventHandler('esx_jobcenter:bono',function()
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
local xBono = xPlayer.getInventoryItem('bono')
if xBono then
xPlayer.addMoney(100000)
xPlayer.removeInventoryItem('bono', 1)
end
end
end)
i need to give to the player money only when they have a item called bono,
and the player its on a specific point