Advertisement
Matrix1

tazer

Jun 17th, 2014
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(gTeam[playerid] == 2 || IsACop(playerid))
  6. {
  7. if(IsPlayerInAnyVehicle(playerid))
  8. {
  9. SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da go koristite tazerot dodeka ste vo avtomobil.");
  10. return 1;
  11. }
  12. if(KnockedDown[playerid] == 1)
  13. {
  14. SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da tazirate bidejki ste na zemja.");
  15. return 1;
  16. }
  17. if(PlayerTied[playerid] == 1)
  18. {
  19. SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Zavrzan ste.");
  20. return 1;
  21. }
  22. if(ReduceTime[playerid] == 1)
  23. {
  24. SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Mora da pocekate 5 sekundi za da ja koristite povtorno.");
  25. return 1;
  26. }
  27. new suspect = GetClosestPlayer(playerid);
  28. if(IsPlayerConnected(suspect))
  29. {
  30. if(PlayerCuffed[suspect] > 0)
  31. {
  32. SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Igracot vekje ima lisici ili ima tazer.");
  33. return 1;
  34. }
  35. if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
  36. {
  37. if(gTeam[suspect] == 2)
  38. {
  39. SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da tazirate PD/SWAT/MVR.");
  40. return 1;
  41. }
  42. if(IsPlayerInAnyVehicle(suspect))
  43. {
  44. SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da tazirate dokolku covekot e vo avtomobil.");
  45. return 1;
  46. }
  47. GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
  48. GetPlayerName(playerid, sendername, sizeof(sendername));
  49. new randt = random(4)+1;
  50. if(randt == 1)
  51. {
  52. format(string, sizeof(string), "* %s udira so svojot tazer na %s, no promasuva.", sendername ,giveplayer);
  53. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  54. }
  55. else
  56. {
  57. format(string, sizeof(string), "{37F906}INFO:{FFFFFF}%s ve tazira na 10 sekundi.", sendername);
  58. SendClientMessage(suspect, COLOR_WHITE, string);
  59. format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Go taziravte %s-a na 10 sekundi.", giveplayer);
  60. SendClientMessage(playerid, COLOR_WHITE, string);
  61. format(string, sizeof(string), "* %s udira so tazer na %s i go pogoduva.", sendername ,giveplayer);
  62. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  63. GameTextForPlayer(suspect, "~r~Sokiran", 2500, 3);
  64. TogglePlayerControllable(suspect, 0);
  65. PlayerCuffed[suspect] = 1;
  66. PlayerCuffedTime[suspect] = 15;
  67. ReduceTime[playerid] = 1;
  68. SetTimerEx("ReduceTimer", 5000, false, "i", playerid);
  69. }
  70. }
  71. else
  72. {
  73. SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nema nikoj vo vasata blizina.");
  74. return 1;
  75. }
  76. }
  77. }
  78. else
  79. {
  80. SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Ne ste PD/SWAT/MVR.");
  81. }
  82. }//not connected
  83. return 1;
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement