I wanna to make a simulation like food but with action id, reached this but the game crashes while using it .
solved the problem was from the file path it was on another way btw.
Code:
quences = 400
local drunk = createConditionObject(CONDITION_DRUNK)
setConditionParam(drunk, CONDITION_PARAM_TICKS, 10000)
function onUse(cid, item, frompos, item2, topos)
food = 60
if (getPlayerFood(cid) + food > quences) then
doPlayerSendCancel(cid,"You are full.")
return 1
end
doPlayerFeed(cid,food)
doPlayerSay(cid,"Yummy",16)
return 1
end
Code:
<action itemid="5882" event="script" value="new/infinity food.lua"/>
solved the problem was from the file path it was on another way btw.