manawydan Posted January 15, 2013 Posted January 15, 2013 is there any function to push a ped? I want to push a ped when a zombie attacks him.
psydomin Posted January 15, 2013 Posted January 15, 2013 Push? to the ground? An animation could work
manawydan Posted January 15, 2013 Author Posted January 15, 2013 an example of what I want to do addEventHandler("onPlayerDamage", root, function(attacker, weapon, bodypart, loss) x, y, z = getElementPosition(source) if ( getElementData ( attacker, "zombie", true)) then movePed(source, x+2, y+2, z+8) end end)
Castillo Posted January 15, 2013 Posted January 15, 2013 addEventHandler ( "onPlayerDamage", root, function ( attacker, weapon, bodypart, loss ) local x, y, z = getElementVelocity ( source ) if ( getElementData ( attacker, "zombie" ) ) then setElementVelocity ( source, x + 2, y + 2, z + 8 ) end end )
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now