_Aion_
Nothing Else
Hello, I'm trying to make a script that, the player will be alerted of the position of the item next to him.
This is my code
Print "item find" if i change getTileItemById(isInRange(getCreaturePosition(cid), var[1], var[2]), 22718).uid > 0 to
isInRange(getCreaturePosition(cid), var[1], var[2])
How fix this?
This is my code
Lua:
function onSay(cid, words, param, channel)
local area = {
{{x=994,y=1003,z=7}, {x=1007,y=1008,z=7}},
}
for _, var in ipairs(area) do
if getTileItemById(isInRange(getCreaturePosition(cid), var[1], var[2]), 22718).uid > 0 then
doPlayerSendTextMessage(cid,19, "Item find")
else
doPlayerSendTextMessage(cid,19, "Don't find item")
end
end
return true
end
isInRange(getCreaturePosition(cid), var[1], var[2])
How fix this?