• 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} Storage not setting

Cadyan

Well-Known Member
Joined
Mar 30, 2008
Messages
844
Reaction score
63
Mystic Spirit 0.2.15
When I am wearing the correct item, the storage is still set to 0.
Cannot seem to figure it out.

Code:
function onThink(cid, interval)
    local weapons = {
    [1] = {ID = 2376, STOR = 1},
    [2] = {ID = 2386, STOR = 2},
    }
    for i = 1, #weapons do
        if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == weapons[i].ID or getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == weapons[i].ID then
            setPlayerStorageValue(cid, 10003, weapons[i].STOR)
        else
            setPlayerStorageValue(cid, 10003, 0)
        end  
    end
end
 
Back
Top