• 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!

Item No add Attribute

aberos

New Member
Joined
Feb 26, 2014
Messages
17
Reaction score
0
Hello, I would like to know what you want is wrong with this code because it is not adding the attribute item

Code:
function onSay(cid, words, param)
    local player = Player(cid)

    local orig = player:getPosition()
    orig:sendMagicEffect(CONST_ME_MAGIC_RED)
    local ball = player:addItem(2181, 1)
    doSetItemText(Item(ball), "Poke = Bulbasaur")
    print(ball:getAttribute(ITEM_ATTRIBUTE_TEXT))
    return false
end

TFS 1.0
 
Code:
    function onSay(cid, words, param)
        local player = Player(cid)
        local orig = player:getPosition()
        orig:sendMagicEffect(CONST_ME_MAGIC_RED)
        local ball = player:addItem(2181, 1)
        ball:setAttribute(ITEM_ATTRIBUTE_TEXT, "Poke = Bulbasaur")
        print(ball:getAttribute(ITEM_ATTRIBUTE_TEXT))
        return true
    end
 
Back
Top