ESX = nil 
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterNetEvent("almeiidaa:pay")
AddEventHandler("almeiidaa:pay", function(entity)
local xPlayer = ESX.GetPlayerFromId(source)

xPlayer.removeMoney(20)
end)

RegisterServerEvent("eff_smokes")
AddEventHandler("eff_smokes", function(entity)
	TriggerClientEvent("c_eff_smokes", -1, entity)
end)

ESX.RegisterUsableItem('hookah', function(playerId)
    local xPlayer = ESX.GetPlayerFromId(playerId)
    xPlayer.removeInventoryItem('hookah', 1)
	xPlayer.showNotification('~g~A Shisha foi colocada.')
	TriggerClientEvent("almeiidaa_hookah:spawn", -1, entity)
end)

RegisterCommand("deletehookah", function(source, args, rawCommand)
	local xPlayer = ESX.GetPlayerFromId(source)
	TriggerClientEvent("almeiidaa_hookah:delete", -1, entity)
	xPlayer.addInventoryItem("hookah", 1)
end)