Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler("onClientPedDamage", getRootElement(),cFunc["anim_check"])
- addEventHandler("onClientPlayerDamage", getRootElement(),cFunc["anim_check"])
- cFunc["anim_check"] = function(_, wep, bodypart)
- if wep == 23 then
- attackerX, attackerY, attackerZ = getElementPosition(_)
- objetiveX, objetiveY, objetiveZ = getElementPosition(source)
- if getDistanceBetweenPoints3D(attackerX, attackerY, attackerZ, objetiveX, objetiveY, objetiveZ) <= 2 then
- cancelEvent()
- else
- if getDistanceBetweenPoints3D(attackerX, attackerY, attackerZ, objetiveX, objetiveY, objetiveZ) >= 13 then
- cancelEvent()
- else
- if(wep == 23) and (bodypart == 9) then
- setPedAnimation(source, "ped", "KO_shot_face", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 8) then
- setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 7) then
- setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 6) then
- setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 5) then
- setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 4) then
- setPedAnimation(source, "CRACK", "crckdeth3", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 3) then
- setPedAnimation(source, "ped", "KO_shot_stom", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 2) then
- setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
- elseif(wep == 23) and (bodypart == 1) then
- setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement