Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. #define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #if defined FILTERSCRIPT
  8.  
  9. new KillingSpree[MAX_PLAYERS];
  10.  
  11. public OnFilterScriptInit()
  12. {
  13. print("\n--------------------------------------");
  14. print(" Killing Spree");
  15. print("--------------------------------------\n");
  16. return 1;
  17. }
  18.  
  19. public OnFilterScriptExit()
  20. {
  21. return 1;
  22. }
  23.  
  24. #else
  25.  
  26. main()
  27. {
  28. print("\n----------------------------------");
  29. print(" Killing Spree By Niko_boy For PK SAMP SERVER ");
  30. print("----------------------------------\n");
  31. }
  32.  
  33.  
  34.  
  35. public OnGameModeInit()
  36. {
  37.  
  38. return 1;
  39. }
  40.  
  41. public OnGameModeExit()
  42. {
  43. return 1;
  44. }
  45.  
  46.  
  47. public OnPlayerConnect(playerid)
  48. {
  49. KillingSpree[playerid] = 0;
  50. return 1;
  51. }
  52.  
  53. public OnPlayerDeath(playerid, killerid, reason)
  54. {
  55. new KillingSpree[MAX_PLAYERS];
  56. KillingSpree[killerid] ++ ; // 1 kills
  57. KillingSpree[playerid] = 0; // player who died his killing spree will be restored to 0.
  58.  
  59. //------- // finds the player on a Killing Spree of 3 kills
  60. if(killerid == INVALID_PLAYER_ID)
  61. {
  62. SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
  63. }
  64. else
  65. {
  66. SendDeathMessage(killerid,playerid,reason);
  67. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  68. GivePlayerMoney(playerid,-1000);
  69. if(bounty[playerid] > 0 && (playerGang[killerid] == 0 || playerGang[playerid] != playerGang[killerid])) {
  70. GetPlayerName(playerid, killedplayer, sizeof(killedplayer));
  71. format(string, sizeof(string), "You earned a bounty of %d for killing %s.", bounty[playerid], killedplayer);
  72. SendClientMessage(killerid, COLOR_GREEN, string);
  73.  
  74. GivePlayerMoney(killerid, bounty[playerid]);
  75. bounty[playerid] = 0;
  76. }
  77. if(playercash > 0) {
  78. GivePlayerMoney(killerid, playercash);
  79. }
  80. }
  81. //==//
  82. SetPlayerWantedLevel(playerid, 0);
  83. KillingSpree[playerid] = 0;
  84. KillingSpree[killerid] ++;
  85. //--------------
  86.  
  87.  
  88. if (KillingSpree[killerid] == 20)
  89. {
  90. SetPlayerWantedLevel(killerid, 6);
  91. GivePlayerMoney (killerid,20000);
  92. GivePlayerWeapon (killerid,35,7);
  93. GivePlayerHealth (killerid,30);
  94. SetPlayerArmour(killerid,90);
  95. format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
  96. SendClientMessage(killerid, COLOR_RED, string)
  97. }//---------------
  98. else if (KillingSpree[killerid] == 16)
  99. {
  100.  
  101. GivePlayerMoney (killerid,8000);
  102. GivePlayerWeapon (killerid,16,5);
  103. GivePlayerHealth (killerid,25);
  104. GivePlayerArmour(killerid,30);
  105. format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
  106. SendClientMessage(killerid, COLOR_RED, string);
  107. SetPlayerWantedLevel(killerid, 4)
  108. }
  109. else if (KillingSpree[killerid] == 12)
  110. {
  111. SetPlayerWantedLevel(killerid, 3);
  112. GivePlayerMoney (killerid,5000);
  113. GivePlayerWeapon (killerid,31,150);
  114. GivePlayerHealth (killerid,20);
  115. GivePlayerArmour(killerid,20);
  116. format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
  117. SendClientMessage(killerid, COLOR_PINK, string)
  118. }
  119. else if (KillingSpree[killerid] == 8)
  120. {
  121. SetPlayerWantedLevel(killerid, 2);
  122. GivePlayerMoney (killerid,3000);
  123. GivePlayerWeapon (killerid,28,280);
  124. GivePlayerHealth (killerid,15);
  125. GivePlayerArmour(killerid,15);
  126. format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
  127. SendClientMessage(killerid, COLOR_DARKGREEN, string)
  128. }
  129. else if (KillingSpree[killerid] == 5)
  130. {
  131. SetPlayerWantedLevel(killerid, 1);
  132. GivePlayerMoney (killerid,1270);
  133. GivePlayerWeapon (killerid,24,250);
  134. GivePlayerHealth (killerid,10);
  135. GivePlayerArmour(killerid,10);
  136. format(string, sizeof(string), "You Got %d Bonus for killing %s.", bounty[playerid], killedplayer);
  137. SendClientMessage(killerid, COLOR_YELLOW, string)
  138. }
  139. if (KillingSpree[killerid] > 5)
  140. {
  141. new string[128];
  142. format(string,sizeof(string),"%s now got a killings spree of %d !!!", killerid, KillingSpree);
  143. SendClientMessageToAll(red, string); print(string);
  144. }
  145.  
  146.  
  147. return 1;
  148. }
  149.  
  150. public OnPlayerText(playerid, text[])
  151. {
  152. return 1;
  153. }
  154.  
  155. public OnPlayerCommandText(playerid, cmdtext[])
  156. {
  157. if (strcmp("/ksh", cmdtext, true, 10) == 0)
  158. {
  159. // Do something here
  160. return 1;
  161. }
  162. return 0;
  163. }
  164.  
  165. public OnRconCommand(cmd[])
  166. {
  167. return 1;
  168. }
  169.  
  170. public OnPlayerRequestSpawn(playerid)
  171. {
  172. return 1;
  173. }
  174.  
  175.  
  176. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement