Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
Okay so I made a script that changes a might ring into a death ring. But when you click use on the might ring, it goes into your backpack. I would like for it to go back into the ring slot.
I don't know if it can be done by doTransformItem or CONST_SLOT_RING, but someone please help me.
Edit, nvm guys.. got it working.
I don't know if it can be done by doTransformItem or CONST_SLOT_RING, but someone please help me.
PHP:
function onUse(cid, item, frompos, item2, topos)
if doPlayerRemoveMoney(cid, 500000) == TRUE then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA);
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,6300,1)
else
doPlayerSendCancel(cid, 'You need 50 Crystal coins.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
Edit, nvm guys.. got it working.
PHP:
function onUse(cid, item, frompos, item2, topos)
local value = 6301
if doPlayerRemoveMoney(cid, 500000) == TRUE then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA);
doTransformItem(item.uid, value)
else
doPlayerSendCancel(cid, 'You need 50 Crystal coins.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end