Jump to content

Deixar PED imortal


Recommended Posts

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
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]

  • Thanks 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...