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

Lua Why isnt this action adding the mount it should?

Oneda

Aspiring Spriter
Joined
Dec 3, 2013
Messages
159
Solutions
2
Reaction score
104
Location
Brazil
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
        doPlayerPopupFYI(cid, "You created a steelbeak mount, it consumed one royal steel piece.")
    if not player:hasMount(34) then
        player:addMount(34)
        player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
        doPlayerPopupFYI(cid, "You created a steelbeak mount, it consumed one royal steel piece.")
    else
        player:sendCancelMessage("You already have this mount")
    end
    return true
end

Well, the problem here is that the script above isnt adding the mount, no errors on console or anything. (Steelbeak mount ID btw)

TFS 1.1
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
        doPlayerPopupFYI(cid, "You created a steelbeak mount, it consumed one royal steel piece.")
    if not player:hasMount(34) then
        player:addMount(34)
        player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
        doPlayerPopupFYI(cid, "You created a steelbeak mount, it consumed one royal steel piece.")
    else
        player:sendCancelMessage("You already have this mount")
    end
    return true
end

Well, the problem here is that the script above isnt adding the mount, no errors on console or anything. (Steelbeak mount ID btw)

TFS 1.1

Could you post your mounts.xml?

Is it possible that the player is not premium and the mount is only available for premium players?
 
Tried with a non-premium mount and still nothing

EDIT -- nvm, i'm dumb as fuck, it was the premmy thing.
 
Last edited:
Back
Top