Jump to content

I need help whit my tazer!


kevenvz

Recommended Posts

Hello, I am new in scripting and here it is.

I don't know how to script a tazer.

I want a tazer that if your team is 'Cops' and when you shoot whit a deser eagle that it won't hurt the guy and that it will set the player animation in FALL_front. (Search in wiki by animation list)

Please can you make this for me?

Link to comment

Thanks for the wiki pages. I hope I can make it!

EDIT: That team is too hard I think so I did this:

  
function cancelPedDamage ( attacker, weapon ) 
    if (attacker) and (weapon == 24) then 
setPedAnimation( source, "ped", "FALL_front") 
    cancelEvent() -- cancel any damage done to peds 
end 
end 
addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage ) 
  

I don't know or this will work. But I will try it. And if it don't work then please can you make it or 50P?

Link to comment

I did this. Realy wired here is my code:

  
-- server sided 
function cancelPedDamage ( attacker, weapon ) 
    if (attacker) and (weapon == 24) then 
    setPedAnimation( source, "ped", "FALL_front") 
    cancelEvent() -- cancel any damage done to peds 
    end 
end 
addEventHandler ( "onPlayerDamage", getRootElement(), cancelPedDamage ) 
  

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