local exp = 500000
function onUse(cid, item, fromPos, itemEx, toPos)
if getPlayerLevel(cid) >= 50 then
doPlayerAddExp(cid, exp)
doSendPlayerTextMessage(cid, 22, "You have gained ".. exp .." experience points.")
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, "You must be atleast level 50 to use this.")
end
end
Oh comeon I know that
It's just that the script works to remove the item but it wont give the exp. So I assume the problem is in the doPlayerAddExp.
doPlayerAddExp(cid, exp)
doPlayerAddExp(cid, 1000)