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

Need item to be 1x use

God Mythera

Veteran OT User
Joined
Aug 11, 2012
Messages
2,051
Solutions
2
Reaction score
260
Location
United States
Can someone help me make this so i you already have the addon you cant use it again? :s

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
       
if getPlayerStorageValue(cid,1800) == 10 then
            doCreatureSay(cid, "You already got the second addon", TALKTYPE_ORANGE_1)

    else if getPlayerLevel(cid) >= 8 then
        doCreatureSay(cid, "You received the first addon and the second addon for Pirate Master.", TALKTYPE_ORANGE_1)
            doPlayerAddOutfit(cid, 750, 3)
            doSendMagicEffect(fromPosition, 37)
            doRemoveItem(item.uid)
            setPlayerStorageValue(cid,1800,20)
            return TRUE
        else
                    doCreatureSay(cid, "You must be level 8 to get the second addon", TALKTYPE_ORANGE_1)
        end
end
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
       
    if getPlayerStorageValue(cid,1800) == 20 then
        doCreatureSay(cid, "You already got the second addon", TALKTYPE_ORANGE_1)
        return false
    end   
   
    if getPlayerLevel(cid) >= 8 then
        doCreatureSay(cid, "You received the first addon and the second addon for Pirate Master.", TALKTYPE_ORANGE_1)
        doPlayerAddOutfit(cid, 750, 3)
        doSendMagicEffect(fromPosition, 37)
        doRemoveItem(item.uid)
        setPlayerStorageValue(cid,1800,20)
    else
        doCreatureSay(cid, "You must be level 8 to get the second addon", TALKTYPE_ORANGE_1)
    end
    return true
end

Try that ;)
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
     
    if getPlayerStorageValue(cid,1800) == 20 then
        doCreatureSay(cid, "You already got the second addon", TALKTYPE_ORANGE_1)
        return false
    end 
 
    if getPlayerLevel(cid) >= 8 then
        doCreatureSay(cid, "You received the first addon and the second addon for Pirate Master.", TALKTYPE_ORANGE_1)
        doPlayerAddOutfit(cid, 750, 3)
        doSendMagicEffect(fromPosition, 37)
        doRemoveItem(item.uid)
        setPlayerStorageValue(cid,1800,20)
    else
        doCreatureSay(cid, "You must be level 8 to get the second addon", TALKTYPE_ORANGE_1)
    end
    return true
end

Try that ;)
its not 1 use : s it keeps using it

I'm surprised the script you provided works...
@topic
Hint
Code:
doRemoveItem(item.uid)
ofc it removes it but it keeps letting me use it...
 

Similar threads

Back
Top