Doongogar Posted February 24, 2023 Posted February 24, 2023 (edited) então eu to usando esse codigo aqui, ele chega a ficar imortal contra tiros e talz, mas o stealth kill não ta funcionando(sem erros no debug) [Sim, estou setando o element data "imortal" nos ped's] function onStealthKill (targetPed) if (getElementData (targetPed, "imortal")) then cancelEvent() end end addEventHandler ("onPlayerStealthKill", root, onStealthKill) function cancelDamage() if (getElementData (source, "imortal")) then cancelEvent() end end addEventHandler ("onClientPedDamage", root, cancelDamage) Edited February 24, 2023 by SciptNovato
Moderators Lord Henry Posted February 25, 2023 Moderators Posted February 25, 2023 O nome do seu evento está errado. O nome correto é onClientPlayerStealthKill. Faça assim: addEventHandler ("onClientPlayerDamage", root, function () if getElementData(source, "imortal") then cancelEvent() end end) addEventHandler ("onClientPlayerStealthKill", localPlayer, function (targetPlayer) if getElementData (targetPlayer, "imortal") then cancelEvent() end end) 1 Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
Doongogar Posted February 25, 2023 Author Posted February 25, 2023 isso me faz feliz, perfeito, é por isso que todo mundo aqui te ama 1
Recommended Posts