Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slots = 10 -- Para registro, nao mexa
- local tabVal = {
- [2523] = {value = 1, slot = 0}, -- O Numero do Slot
- [2195] = {value = 2, slot = 1}
- }
- function onEquip(cid, item, slot)
- local soma = 0
- for x = 1, 10 do
- checkItem = tabVal[getPlayerSlotItem(cid, x).itemid]
- if checkItem and slot == checkItem.slot then
- soma = soma + checkItem.value
- end
- if x == slots then
- getColor = getCreatureOutfit(cid)
- result = {lookType = 128, lookHead = getColor.lookHead, lookBody = getColor.lookBody, lookLegs = getColor.lookLegs, lookFeet = getColor.lookFeet, lookAddons = soma}
- doSetCreatureOutfit(cid, result, -1)
- end
- end
- return true
- end
- function onDeEquip(cid, item, slot)
- local soma = 0
- for x = 1, 10 do
- checkItem = tabVal[getPlayerSlotItem(cid, x).itemid]
- if checkItem and slot == checkItem.slot then
- soma = soma + checkItem.value
- end
- if x == slots then
- getColor = getCreatureOutfit(cid)
- result = {lookType = 128, lookHead = getColor.lookHead, lookBody = getColor.lookBody, lookLegs = getColor.lookLegs, lookFeet = getColor.lookFeet, lookAddons = soma}
- doSetCreatureOutfit(cid, result, -1)
- end
- end
- return true
- end
Add Comment
Please, Sign In to add comment