Matheus Vieira
Member
- Joined
- Apr 11, 2015
- Messages
- 102
- Reaction score
- 6
Well, the title is pretty explanatory, I made a spell that, when you use it, its create an item in your ammo slot, and in item.xml, i put the decay and duration, But...
The item does not 'fade away'. My decay is to 0, so it should disappear. When i put the duration, also i put the 'show duration' and the seconds does not decay. I don't know what i am doing wrong
The spell:
The item:
Summing up: I want this item to disappear, but the timer does not start
Also, in the movements, the slot is in "ammo"
The item does not 'fade away'. My decay is to 0, so it should disappear. When i put the duration, also i put the 'show duration' and the seconds does not decay. I don't know what i am doing wrong
The spell:
C++:
function onCastSpell(cid, var)
local storage = 17127
local time = 3
if(exhaustion.make(cid, storage, time) == true) then
if getPlayerSlotItem(cid, 10).itemid > 0 then
doPlayerSendTextMessage(cid, 22, "Nop")
else
doPlayerAddItem(cid, 13216, 1, true, 1, SLOT_AMMO)
end
else
doPlayerSendCancel(cid, "Cooldown: "..exhaustion.get(cid, storage)+1)
return false
end
end
The item:
C++:
<attribute key="decayTo" value="0"/>
<attribute key="duration" value="450"/>
<attribute key="showduration" value="1"/>
<attribute key="showattributes" value="1"/>
<attribute key="weight" value="0"/>
Summing up: I want this item to disappear, but the timer does not start
Also, in the movements, the slot is in "ammo"