Joaovit13 Posted January 25, 2021 Share Posted January 25, 2021 Bom estou querendo deixar o ped do script que estou fazendo imortal porém a função que eu coloquei não está funcionando. Ped = createPed(150,370.40481567383,-2038.2592773438,7.671875) 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) Estou querendo saber aonde está o meu erro ou oque está faltando colocar. Link to comment
MRXBBC Posted January 25, 2021 Share Posted January 25, 2021 faça desta forma Ped = createPed(150,370.40481567383,-2038.2592773438,7.671875) function cancelPedDamage() cancelEvent() end addEventHandler("onClientPedDamage", Ped, cancelPedDamage) 1 Link to comment
LucasST Posted January 26, 2021 Share Posted January 26, 2021 Ped = createPed(150,370.40481567383,-2038.2592773438,7.671875) function onStealthKill () if source == Ped then cancelEvent() end end addEventHandler ("onClientPlayerStealthKill", root, onStealthKill) function cancelDamage() if source == Ped then cancelEvent() end end addEventHandler ("onClientPedDamage", root, cancelDamage) Lembre-se que o ped tem que ser criado no [Client-Side] 1 Link to comment
Joaovit13 Posted January 26, 2021 Author Share Posted January 26, 2021 valeu pessoal, consegui aqui! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now