Jump to content

killZombie


DRW

Recommended Posts

Posted
addEventHandler("onPlayerDamage",root, function(attacker, weapon) 
    if weapon == 8 and getElementType ( source ) ~= "ped" then 
        killPed(source,attacker,weapon) 
    end 
end) 

I want to make slothman's zombies die when they get hit by a specific weapon, but I don't know how, I've tried googling and looking at the MTA Wiki but nothing works.

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted

Try to use this

addEventHandler("onPlayerDamage",root,  
  function(attacker, weapon) 
     if weapon == 8 and getElementType ( source ) == "ped" then  
       if  (getElementData (source, "zombie") == true) then 
        killPed(source,attacker,weapon) 
      end 
   end  
end) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
Try to use this
addEventHandler("onPlayerDamage",root,  
  function(attacker, weapon) 
     if weapon == 8 and getElementType ( source ) == "ped" then  
       if  (getElementData (source, "zombie") == true) then 
        killPed(source,attacker,weapon) 
      end 
   end  
end) 

Not working...

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted
debugscript ?

nothing

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted

try this

addEventHandler("onPlayerDamage",root, 
  function(attacker, weapon) 
    if getElementType(source) == "player" then 
        if type(attacker) == "ped" then 
            if ( getPedWeapon(attacker) == 8 and getElementData (source, "zombie") == false ) then 
                killPed(source, attacker, weapon) 
                outputChatBox("true", source) 
            end 
        end 
    end 
end) 
  

Inactivo.

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