Jump to content

Tengo Una Duda...


Recommended Posts

Posted

Hola, Tengo una duda ase poco no tenia internet y comense a aser un script y ise un laser que lo cambia por la katana y con los sonidos todo eso iva bien pero me llego una duda de como aser que solo la katana al darte en un lugar del cuerpo ej:Torso que te quite toda la vida que tengas. se podria haser eso?

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted

Podrias usar algo así

function healthP ( attacker, weapon, bodypart, loss ) 
     if getElementType ( attacker ) == "player"  and weapon == 8 then 
         killPed ( source ) 
         outputChatBox("Estás muerto...", source, 255, 0, 0, 0, false) 
     end 
end 
addEventHandler("onPlayerDamage", getRootElement(), healthP) 

------------------------------------------------------------------------------------------

My scripts

http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977

http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740

Posted
Podrias usar algo así

function healthP ( attacker, weapon, bodypart, loss ) 
     if getElementType ( attacker ) == "player"  and weapon == 8 then 
         killPed ( source ) 
         outputChatBox("Estás muerto...", source, 255, 0, 0, 0, false) 
     end 
end 
addEventHandler("onPlayerDamage", getRootElement(), healthP) 

Serviria Tambien que al atacar a un zombie el zombie muera?

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted
Podrias usar algo así

function healthP ( attacker, weapon, bodypart, loss ) 
     if getElementType ( attacker ) == "player"  and weapon == 8 then 
         killPed ( source ) 
         outputChatBox("Estás muerto...", source, 255, 0, 0, 0, false) 
     end 
end 
addEventHandler("onPlayerDamage", getRootElement(), healthP) 

Serviria Tambien que al atacar a un zombie el zombie muera?

No, tendrias que hacér otro. Talvéz con un loop para los peds.

------------------------------------------------------------------------------------------

My scripts

http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977

http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740

Posted
Podrias usar algo así

function healthP ( attacker, weapon, bodypart, loss ) 
     if getElementType ( attacker ) == "player"  and weapon == 8 then 
         killPed ( source ) 
         outputChatBox("Estás muerto...", source, 255, 0, 0, 0, false) 
     end 
end 
addEventHandler("onPlayerDamage", getRootElement(), healthP) 

Serviria Tambien que al atacar a un zombie el zombie muera?

No, tendrias que hacér otro. Talvéz con un loop para los peds.

Un loop? para que? puede usar "onClientPedDamage".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No estoy muy seguro de esto, no lo tengo testeado

function healthP ( attacker, weapon, bodypart, loss ) 
    if (getElementType( attacker ) == "ped") and weapon == 8 then 
        killPed ( source ) 
        outputChatBox("Estás muerto...", source, 255, 0, 0, false) 
     end 
end 
addEventHandler("onClientPedDamage", getRootElement(), healthP) 

Posted

killPed es server side, onClientPedDamage client side.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
killPed es server side, onClientPedDamage client side.

Entonces que hago?

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted

Usa triggerServerEvent.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Usa triggerServerEvent.

Pero Como se usa jamas he usado el triggerServerEvent y en la wiki no entendi

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted

-- client side:

function healthP ( attacker, weapon, bodypart, loss ) 
    if ( attacker and getElementType ( attacker ) == "ped" and weapon == 8 ) then 
        triggerServerEvent ( "killZombie", localPlayer, source ) 
    end 
end 
addEventHandler ( "onClientPedDamage", getRootElement(), healthP ) 

-- server side:

addEvent ( "killZombie", true ) 
addEventHandler ( "killZombie", root, 
    function ( zombie ) 
        killPed ( zombie ) 
    end 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Oh verdad, no me habia dado cuenta, quizás esto le podria servir ahora enves de mandar trigger

function healthP ( attacker, weapon, bodypart, loss ) 
    if (getElementType( attacker ) == "ped") and weapon == 8 then 
        setElementHealth(source, 0) 
        outputChatBox("Estás muerto...", source, 255, 0, 0, false) 
     end 
end 
addEventHandler("onClientPedDamage", getRootElement(), healthP) 

Posted
Oh verdad, no me habia dado cuenta, quizás esto le podria servir ahora enves de mandar trigger
function healthP ( attacker, weapon, bodypart, loss ) 
    if (getElementType( attacker ) == "ped") and weapon == 8 then 
        setElementHealth(source, 0) 
        outputChatBox("Estás muerto...", source, 255, 0, 0, false) 
     end 
end 
addEventHandler("onClientPedDamage", getRootElement(), healthP) 

En que lugar esta para ubicar a donde hay que darle al zombi?

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted
Solo tendrías que matarlo con la arma 8 y ya

le doy con el arma 8 y no le pasa nada al zombie

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted
Entonces prueba con el script que te dio Solid.

Probe y nada :I

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted

Intenta esto

-- Client

function healthP ( attacker, weapon, bodypart, loss ) 
    if (getElementType ( attacker ) == "ped" and weapon == 8 ) then 
        triggerServerEvent ( "killZombie", localPlayer, source ) 
    end 
end 
addEventHandler ( "onClientPedDamage", getRootElement(), healthP ) 

-- Server

addEvent ( "killZombie", true ) 
addEventHandler ( "killZombie", root, 
    function ( zombie ) 
        killPed ( zombie ) 
        outputChatBox("Estás muerto...", source, 255, 0, 0, false) 
    end 
) 

Posted
Entonces prueba con el script que te dio Solid.

Probe y nada :I

Postea el meta.xml.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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