Jump to content

killZombie


DRW

Recommended Posts

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.

Link to comment

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) 

Link to comment
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...

Link to comment

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) 
  

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