• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved SOLVED!

Try this:


PHP:
function onUse(cid, item, frompos, item2, topos)
    local lvl = getPlayerLevel(cid)
  
    if lvl >= 10 and lvl <= 39 then
        doPlayerAddExperience(cid, 300)
        exps = 300
    elseif lvl >= 41 and lvl <= 48 then
        doPlayerAddExperience(cid, 100)
        exps = 100
    elseif lvl >= 51 and lvl <= 99 then
        doPlayerAddExperience(cid, 50)
        exps = 50
      
    else
        exps = 0
    end
      
        if exps >= 1 then
            --doPlayerSay(cid,""..exps.." experiance Up",2)
            doPlayerSendTextMessage(cid,22,"You Gained a " .. exps )
            doSendMagicEffect(getPlayerPosition(cid), 14)
            doRemoveItem(item.uid, 1)
        else

          doPlayerSendTextMessage(cid,22,"You Cannot Use This Object.")

                    --doPlayerSay(cid,"You Cannot Use This Object",2)
        end
      
    return true
end

This is a Simple example... You need adpt the MSG code. (Dont Use This (doPlayerSay))
Use DoPlayerSendMesage
 
Back
Top