Can someone repair this script
All works, but when someone stay on this door and "klick" to close then the door don't close but it will be created a next item (.itemid + 1). How to repair this?
Code:
[COLOR="darkgreen"]function onUse(cid, item, fromPosition, itemEx, toPosition)
local k = getPlayerLevel(cid)
if k >= 1 and k <= 13 then
doTransformItem(item.uid,[COLOR="darkred"] item.itemid + 1[/COLOR])
doTeleportThing(cid, toPosition, true)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Players from lvl 1 to lvl 13 can pass this door.')
end
return true
end[/COLOR]
All works, but when someone stay on this door and "klick" to close then the door don't close but it will be created a next item (.itemid + 1). How to repair this?