Hi, I have a small problem with my function use of my inventory, I have created a system so that when I use face its realizes a function according to the canUse except that it realizes me the same function for all the items .
My function use :
function use(val)
local itemId = val[1]
local canUse = val[2]
if canUse ~= 0 then
if canUse ~= 1 then
pistolsil(itemId)
elseif canUse ~= 2 then
eat(itemId)
end
TriggerEvent('player:looseItemS', itemId, 1)
else
Chat("Cet objet ne fait rien")
end
end
Then after I created normal functions like eat or other
Sorry, breaking if you want, my canUse are the same they do the same function and I want it to face a different function, yet in my code it has marked that it is not the same function