Advertisement
TheBakkeseKing

Untitled

Aug 16th, 2024
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. addEventHandler("onClientPedDamage", getRootElement(),cFunc["anim_check"])
  2. addEventHandler("onClientPlayerDamage", getRootElement(),cFunc["anim_check"])
  3. cFunc["anim_check"] = function(_, wep, bodypart)
  4. if wep == 23 then
  5. attackerX, attackerY, attackerZ = getElementPosition(_)
  6. objetiveX, objetiveY, objetiveZ = getElementPosition(source)
  7. if getDistanceBetweenPoints3D(attackerX, attackerY, attackerZ, objetiveX, objetiveY, objetiveZ) <= 2 then
  8. cancelEvent()
  9. else
  10. if getDistanceBetweenPoints3D(attackerX, attackerY, attackerZ, objetiveX, objetiveY, objetiveZ) >= 13 then
  11. cancelEvent()
  12. else
  13. if(wep == 23) and (bodypart == 9) then
  14. setPedAnimation(source, "ped", "KO_shot_face", 10000, false, true, false)
  15. elseif(wep == 23) and (bodypart == 8) then
  16. setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
  17. elseif(wep == 23) and (bodypart == 7) then
  18. setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
  19. elseif(wep == 23) and (bodypart == 6) then
  20. setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
  21. elseif(wep == 23) and (bodypart == 5) then
  22. setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
  23. elseif(wep == 23) and (bodypart == 4) then
  24. setPedAnimation(source, "CRACK", "crckdeth3", 10000, false, true, false)
  25. elseif(wep == 23) and (bodypart == 3) then
  26. setPedAnimation(source, "ped", "KO_shot_stom", 10000, false, true, false)
  27. elseif(wep == 23) and (bodypart == 2) then
  28. setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
  29. elseif(wep == 23) and (bodypart == 1) then
  30. setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
  31. end
  32. end
  33. end
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement