Why it doesn't work

Hello, I have a script that should give an item after an animation and progressbar
the progressbar and animation does show but it dont give item

Server side :

RegisterServerEvent('esx_fastfood:cookedDrink')
AddEventHandler('esx_fastfood:cookedDrink', function()
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	if xPlayer.canCarryItem('drink', 1) then
		xPlayer.addInventoryItem('drink', 1)
	else
		xPlayer.showNotification('~r~Inventory!', true, false, 120)
	end
end)

Client side :

if IsControlJustReleased(0, E_KEY) then

                        TaskStartScenarioInPlace(PlayerPedId(), 'PROP_HUMAN_BBQ', 0, false)
                        TriggerEvent("mythic_progbar:client:progress", {
                            name = "harvest_drink",
                            duration = 2000,
                            label = "loading...",
                            useWhileDead = false,
                            canCancel = true,
                            controlDisables = {
                                disableMovement = true,
                                disableCarMovement = true,
                                disableMouse = false,
                                disableCombat = true,
                            }
                        }, function(status)
                            if not status then
                                xPlayer.showNotification('~g~WORKED', true, false, 120)
                                ClearPedTasks(PlayerPedId())
                                TriggerServerEvent('esx_fastfood:cookedDrink')
                            end
                        end)
                    end

nothing strikes out directly on a quick glance over your code but try the above and check your server console, lets see the flow that its taking…

also what version of esx are you using?

there is nothing in console

i dont know if your mean is es_extended i think its tree legacy
i used PlumeESX

if you have nothing in your server console then your server event isnt being triggered, does this print anything in ur f8 console?

 if not status then
                                xPlayer.showNotification('~g~WORKED', true, false, 120)
                                ClearPedTasks(PlayerPedId())
                                Citizen.Trace("i am about to trigger the server")
                                TriggerServerEvent('esx_fastfood:cookedDrink')
  end

i find the problem

item didn’t registred but i have a sql file and i do everything that register an item needs