Jump to content

Ayuda


NIKO_19997

Recommended Posts

Para que te saque vida tenes que hacer esto:

function atack(attacker) 
    attacker = getElementData( "zombie" ) 
    if attacker then 
    daño = 10 -- DEFINE EL DAÑO QUE SACARA 
    health = getElementHealth( source ) 
    setElementHeatlh( source, health - daño ) 
    end 
end 
addEventHandler( "onPlayerDamage", root, atack ) 

EDIT: PROBA AHI!

Edited by Guest
Link to comment
Para que te saque vida tenes que hacer esto:
function atack() 
    zombie = getElementData( "zombie" ) 
    if zombie then 
    daño = 10 -- DEFINE EL DAÑO QUE SACARA 
    health = getElementHealth( source ) 
    setElementHeatlh( source, health - daño ) 
    end 
end 
addEventHandler( "onPlayerDamage", root, atack ) 

eso esta mal

Link to comment
function atack(attacker) 
    zomb = getElementData( attacker, "zombie" ) 
    if zomb == "true" then 
    health = getElementHealth( source ) 
    setElementHealth( source, health - 25 ) 
    setElementVelocity()--agrega argumentos para ser lanzado 
    end 
end 
addEventHandler( "onPlayerDamage", root, atack ) 

nose si funcione

Link to comment
  • Recently Browsing   0 members

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