-- Hello friends, i'm have a problem whit this, i dont good to make scripts, and need help:
-- In this script i'm want to equip a ARMOR, and ADD 500+ health, but when DEEQUIP this remove +500 health... but for me don't work, can someone help to fix...
-- Many thx for all...
Code:
function onEquip(cid, item, slot)
local health = getCreatureMaxHealth(cid)
local mana = getCreatureMaxMana(cid)
if getPlayerSlotItem(cid, 4) == TRUE then
doPlayerSendTextMessage(cid, 25, "Health changed...")
setCreatureMaxHealth(cid, health+500)
setCreatureMaxMana(cid, mana+300)
end
end
function onDeEquip(cid, item, slot)
local health = getCreatureMaxHealth(cid)
local mana = getCreatureMaxMana(cid)
doPlayerSendTextMessage(cid, 25, "Health changed...")
setCreatureMaxHealth(cid, health-500)
setCreatureMaxMana(cid, mana-300)
end
-- In this script i'm want to equip a ARMOR, and ADD 500+ health, but when DEEQUIP this remove +500 health... but for me don't work, can someone help to fix...
-- Many thx for all...