Tenta assim:
function getSkillAttribute(cid, attribute)
local a = {1, 4, 7, 8, 9, 5, 6}
local final = {}
for b = 1, #a do
if getPlayerSlotItem(cid, a[b]).uid > 0 then
table.insert(final, a[b])
end
end
local total = 0
for c = 1, #final do
if getItemAttribute(getPlayerSlotItem(cid, final[c]).uid, attribute) then
total = total + getItemAttribute(getPlayerSlotItem(cid, final[c]).uid, attribute)
end
end
return total
end






info
Grupo: Visconde
Registrado: 27/02/13
Posts: 446
Reputação: +282
Gênero: Masculino
Olá galera, eu estou criando uma função para pegar todos os equips qe o player tiver usando
e checar o atributo que essa armadura tem, e depois somar todos e retornar esse valor.
mas está dando um error, qe eu ja pensei pensei , e não consegui solucionar .
se alguem poder ajudar .
Função
Error