I've got:
LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) if getCreatureName(itemEx.uid):lower() == "Bubbles" then if getPlayerStorageValue(cid, 1330) < 1 then setPlayerStorageValue(cid, 1330, 1) doRemoveItem(itemEx.uid, 1) doCreatureSay(cid, "You caught Bubbles!", TALKTYPE_ORANGE_1) else doPlayerSendCancel(cid, "Nope..") end end return true end
But it's not working. Nothing happens
:lower()
Oh yes, sorry. 0.4Always let people know what TFS version or Engine you are using so that they can help you better.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureName(itemEx.uid):lower() == "Bubbles" then
if getPlayerStorageValue(cid, 1330) < 1 then
setPlayerStorageValue(cid, 1330, 1)
doRemoveItem(itemEx.uid, 1)
doCreatureSay(cid, "You caught Bubbles!", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, "Nope..")
end
end
return true
end
I've got:
LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) if getCreatureName(itemEx.uid):lower() == "Bubbles" then if getPlayerStorageValue(cid, 1330) < 1 then setPlayerStorageValue(cid, 1330, 1) doRemoveItem(itemEx.uid, 1) doCreatureSay(cid, "You caught Bubbles!", TALKTYPE_ORANGE_1) else doPlayerSendCancel(cid, "Nope..") end end return true end
But it's not working. Nothing happens
:lower()
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureName(itemEx.uid):lower() == "bubbles" then
if getPlayerStorageValue(cid, 1330) < 1 then
setPlayerStorageValue(cid, 1330, 1)
-- doRemoveItem(item.uid, 1)
-- doRemoveCreature(itemEx.uid)
doCreatureSay(cid, "You've caught Bubbles!", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, "Nope..")
end
end
return true
end