Postado Março 10, 2021 4 anos tenho um script de pvp enforced , porem ele da a exp pra todos os players que participaram da kill, alguem sabe colocar pra somente o ultimo player que deu o ultimo hit receber? (tipo o que fragou a kill) script: Spoiler function onKill(cid, target, lastHit) local storage = getPlayerStorageValue(target, 2310) if getPlayerLevel(cid) <= getPlayerLevel(target) and isPlayer(cid) and isPlayer(target) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(cid, (getPlayerExperience(target) / 500)) elseif getPlayerLevel(cid) > getPlayerLevel(target) and isPlayer(cid) and isPlayer(target) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(cid, (getPlayerExperience(target) / 5000)) return true end return true end
Postado Março 10, 2021 4 anos @poko360 Muda de onKill para onDeath o xml function onDeath(cid, corpse, killer) local storage = getPlayerStorageValue(cid, 2310) if getPlayerLevel(cid) <= getPlayerLevel(cid) and isPlayer(killer[1]) and isPlayer(cid) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(killer[1], (getPlayerExperience(cid) / 500)) elseif getPlayerLevel(cid) > getPlayerLevel(cid) and isPlayer(killer[1]) and isPlayer(cid) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(killer[1], (getPlayerExperience(cid) / 5000)) return true end return true end Compre seus Scripts Agora totalmente seguro e de forma rápida, aceitamos também encomendas. discord.gg/phJZeHa2k4 Projeto ATS (Naruto) Informações Abaixo Facebook Youtube Discord Tutoriais / Conteúdos Clique Aqui
Postado Março 10, 2021 4 anos Autor @LeoTK ja tentei fazer isso antes, mas nada acontece tentei agr tambem com esse script, nao funfou =C dei uma atualizada no script, removi uma linha q tava dando bug dai testei assim: Spoiler function onDeath(cid, corpse, deathList) local storage = getPlayerStorageValue(target, 2310) if isPlayer(deathList[1]) and isPlayer(target) then doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(deathList[1], (getPlayerExperience(target) / 500)) return true end vc sabe dizer se ta faltando algo? edit: parece que a função OnDeath não reconhece "isPlayer(target)" , vc tem alguma ideia de como posso fazer? Editado Março 10, 2021 4 anos por poko360 (veja o histórico de edições)
Postado Março 10, 2021 4 anos @poko360 editei testa lá Compre seus Scripts Agora totalmente seguro e de forma rápida, aceitamos também encomendas. discord.gg/phJZeHa2k4 Projeto ATS (Naruto) Informações Abaixo Facebook Youtube Discord Tutoriais / Conteúdos Clique Aqui
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.