esx_basicneeds /  client / main.lua
RegisterNetEvent('esx_basicneeds:İtemAdı')
AddEventHandler('esx_basicneeds:İtemAdı', function(prop_name)
        ExecuteCommand('acid')
    if not IsAnimated then
        IsAnimated = true
                 TriggerEvent('pogressBar:drawBar', 3250, 'Hapı İciyorsun', function()
            end)
        Citizen.CreateThread(function()
            local playerPed = PlayerPedId()
            local x,y,z = table.unpack(GetEntityCoords(playerPed))
            local prop = CreateObject(GetHashKey(prop_name), x, y, z + 0.2, true, true, true)
            local boneIndex = GetPedBoneIndex(playerPed, 18905)
            AttachEntityToEntity(prop, playerPed, boneIndex, 0.12, 0.028, 0.001, 10.0, 175.0, 0.0, true, true, false, true, 1, true)
        end)
    end
end)
esx_basicneeds / server / main.lua
ESX.RegisterUsableItem('İtemAdı', function(source)
    local xPlayer = ESX.GetPlayerFromId(source)
    xPlayer.removeInventoryItem('İtemAdı', 1)
    TriggerClientEvent('esx_basicneeds:İtemAdı', source)