manawydan Posted January 15, 2013 Share Posted January 15, 2013 is there any function to push a ped? I want to push a ped when a zombie attacks him. Link to comment
psydomin Posted January 15, 2013 Share Posted January 15, 2013 Push? to the ground? An animation could work Link to comment
Castillo Posted January 15, 2013 Share Posted January 15, 2013 You can use: setElementVelocity Link to comment
manawydan Posted January 15, 2013 Author Share 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) Link to comment
Castillo Posted January 15, 2013 Share 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 ) Link to comment
manawydan Posted January 15, 2013 Author Share Posted January 15, 2013 Thank you. can close the topic Link to comment
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