There's the problem. Try this one
function onUse(cid, item, frompos, item2, topos)
local reset = 5 -- quanty reset
if item.itemid ~= 5122 then
return true
end
if getPlayerReset(cid) < reset then
return doPlayerSendTextMessage(cid,18,"Voce precisa de "..reset.." resets ou mais para passar dessa...