MistarA

Untitled

Aug 13th, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:armX, Float:armY, Float:armZ)
  2. {
  3. if (ArmaCuGloante(weaponid))
  4. {
  5. if(Wounded[hitid] == 0)
  6. {
  7. if(GetPlayerAmmo(playerid) <= 1)
  8. {
  9. SafeGivePlayerWeapon(playerid, weaponid, 1);
  10. ClearAnimations(playerid);
  11. LoopingAnim(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
  12. return 0;
  13. }
  14. else
  15. {
  16. if (hittype == 1)
  17. {
  18. if(weaponid == 23 && CopOnDuty[playerid] == 1 && PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pFaction] == 10)
  19. {
  20. ApplyAnimation(hitid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  21. TogglePlayerControllable(hitid, 0);
  22. SetTimerEx("StopAnim", 30000, 0, "d",hitid);
  23. PlayerActionMessage(hitid,15.0,"a fost lovit de pinii tazerului si a cazut la pamant.");
  24. return 0;
  25. }
  26. else if(weaponid == 25 && BeanBag[playerid] == 1 && PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pFaction] == 10)
  27. {
  28. LoopingAnim(hitid,"PARACHUTE","FALL_skyDive_DIE",3.5,0,0,0,1,0);
  29. TogglePlayerControllable(hitid, 0);
  30. SetTimerEx("StopAnim", 15000, 0, "d",hitid);
  31. PlayerActionMessage(hitid,15.0,"a fost lovit cu gloatele de cauciuc si a cazut la pamant.");
  32. return 0;
  33. }
  34. }
  35. }
  36. }
  37. else
  38. {
  39. return 0;
  40. }
  41. }
  42.  
  43.  
  44. if(strcmp(cmd, "/tazer", true) == 0)
  45. {
  46. if(IsPlayerConnected(playerid))
  47. {
  48. if(PlayerInfo[playerid][pFaction] == 3)
  49. {
  50. if(CopOnDuty[playerid] == 0)
  51. {
  52. SendClientMessage(playerid, COLOR_GREY, "Nu esti duty.");
  53. return 1;
  54. }
  55. if(JustTazed[playerid] == 1)
  56. {
  57. SendClientMessage(playerid, COLOR_GREY, "Nu poti pune asa repede electrosocul inapoi.");
  58. return 1;
  59. }
  60. if(TazerActive[playerid] == 1)
  61. {
  62. TazerActive[playerid] = 0;
  63. PlayerInfo[playerid][pEagle] = 1;
  64. SafeGivePlayerWeapon(playerid, 24, 700);
  65. JustTazed[playerid] = 1;
  66. SetTimerEx("TazeReset", 5000, false, "i", playerid);
  67. SetPlayerChatBubble(playerid,15.0,"pune taserul in suport");
  68. }
  69. else
  70. {
  71. PlayerInfo[playerid][pSilenced] = 1;
  72. SafeGivePlayerWeapon(playerid, 23, 20);
  73. TazerActive[playerid] = 1;
  74. SetPlayerChatBubble(playerid,15.0,"duce mana dreapta la nivelul curelei de utilitati apucand un taser de tip LE x26.");
  75. }
  76. }
  77. else
  78. {
  79. SendClientMessage(playerid, COLOR_GREY, "Factiune invalida.");
  80. }
  81. }
  82. return 1;
  83. }
  84.  
  85. if(strcmp(cmd, "/beanbag", true) == 0 || strcmp(cmd, "/rubberbullets", true) == 0)
  86. {
  87. if(IsPlayerConnected(playerid))
  88. {
  89. if(PlayerInfo[playerid][pFaction] == 3)
  90. {
  91. if(CopOnDuty[playerid] == 0)
  92. {
  93. SendClientMessage(playerid, COLOR_GREY, "Nu esti duty.");
  94. return 1;
  95. }
  96. if(GetPlayerWeapon(playerid) == 25)
  97. {
  98. if (BeanBag[playerid] == 0)
  99. {
  100. BeanBag[playerid] = 1;
  101. SetPlayerChatBubble(playerid,15.0,"duce mana dreapta la nivelul curelei de unde apuca gloantele de cauciuc dupa care le pune in shotgun.");
  102. }
  103. else
  104. {
  105. BeanBag[playerid] = 0;
  106. SetPlayerChatBubble(playerid,15.0,"scoate gloantele de cauciuc din shotgun.");
  107. }
  108. }
  109. else
  110. {
  111. SendClientMessage(playerid, COLOR_GREY,"Nu ai un shotgun in mana.");
  112. }
  113. }
  114. }
  115. return 1;
  116. }
Advertisement
Add Comment
Please, Sign In to add comment