• 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 Addon Lever Problem

Samaster

Raptorserver.ddns.net
Joined
Jun 9, 2013
Messages
291
Reaction score
23
Location
UK
hey, i have this addon lever script problem.. When a character uses the lever, it says they already have the addons when they don't :/
I dont get an error message for this script, it just doesnt function properly ingame:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local v = getPlayerSex(cid) == 0 and 137 or 129
    if not canPlayerWearOutfit(cid, v, 3) then
        return doPlayerSendCancel(cid, "You have already obtained the hunter addons!")
    end
 
    if (getPlayerItemCount(cid, 5875) < 1) or (getPlayerItemCount (cid, 2804) < 100) then
        return doPlayerSendCancel(cid, "You don't have sniper gloves or enough shadow herbs or sniper gloves to obtain this addon!")
    end
 
    doPlayerRemoveItem(cid, 5875, 1)
    doPlayerRemoveItem(cid, 2804, 100)
    doPlayerAddOutfit(cid, v, 3)
    doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, you've obtained the hunter addons!")
    return true
end
 
Back
Top