Xovos/esx_illegal

chemicals

Closed this issue · 4 comments

I can harvest all drugs except chemicals. Is there a solution for that? I'm using now https://github.com/Xovos/esx_illegal/tree/pre-limit-update.

thx

@Xovos I'm having the same issue, any suggestions?

Same here

Replace lines 3-13 in server/chemicals.lua with this..

RegisterServerEvent('esx_illegal:pickedUpChemicals')
AddEventHandler('esx_illegal:pickedUpChemicals', function()
	local xPlayer = ESX.GetPlayerFromId(source)
	local xItem = xPlayer.getInventoryItem('chemicals')

	if xItem.limit ~= -1 and (xItem.count + 1) > xItem.limit then
		xPlayer.showNotification(_U('Chemicals_inventoryfull'))
	else
		xPlayer.addInventoryItem(xItem.name, 1)
	end
end)
Xovos commented

Thanks Hurstzy for the fix