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.
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