Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
  2. {
  3. if(damaged_actorid == ACTOR_CITYHALL_SECUTIRY[0] && IsValidActor(ACTOR_CITYHALL_SECUTIRY[0]) || damaged_actorid == ACTOR_CITYHALL_SECUTIRY[1] && IsValidActor(ACTOR_CITYHALL_SECUTIRY[1]))
  4. {
  5. SetActorHealth(ACTOR_CITYHALL_SECUTIRY[0], 100);
  6. SetActorHealth(ACTOR_CITYHALL_SECUTIRY[1], 100);
  7.  
  8. if(CANT_STOP_ANIMATION[playerid] == -1)
  9. {
  10. if(IsPlayerInRangeOfPoint(playerid, 3.0, 1495.4327,-1786.7675,13.5349)) //actor 0
  11. {
  12. new Float: Health;
  13.  
  14. GetPlayerHealth(playerid, Health);
  15. SafeSetPlayerHealth(playerid, Health-10);
  16.  
  17. ApplyActorAnimation(ACTOR_CITYHALL_SECUTIRY[0], "FIGHT_D","FightD_3", 4.1, 0, 0, 0, 0, 1000);
  18.  
  19. ACTOR_KNOCK_TIMER[playerid] = SetTimerEx("ClearActorKnock", 5000, false, "i", playerid);
  20. CANT_STOP_ANIMATION[playerid] = 1;
  21.  
  22. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 1, 0, 0, 0, 0, 1);
  23. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 1, 0, 0, 0, 0, 1);
  24.  
  25. SendClientMessage(playerid, -1, "Pokusali ste napasti security lice, oboreni ste 5 sekundi.");
  26. }
  27. else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1491.7644,-1790.2700,13.5349)) //actor 1
  28. {
  29. new Float: Health;
  30.  
  31. GetPlayerHealth(playerid, Health);
  32. SafeSetPlayerHealth(playerid, Health-10);
  33.  
  34. ApplyActorAnimation(ACTOR_CITYHALL_SECUTIRY[1], "FIGHT_D","FightD_3", 4.1, 0, 0, 0, 0, 1000);
  35.  
  36. ACTOR_KNOCK_TIMER[playerid] = SetTimerEx("ClearActorKnock", 5000, false, "i", playerid);
  37. CANT_STOP_ANIMATION[playerid] = 1;
  38.  
  39. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 1, 0, 0, 0, 0, 1);
  40. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 1, 0, 0, 0, 0, 1);
  41.  
  42. SendClientMessage(playerid, -1, "Pokusali ste napasti security lice, oboreni ste 5 sekundi.");
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement