Guest User

Untitled

a guest
Feb 13th, 2011
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.34 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3.  
  4.  
  5. #include <a_samp>
  6. #include <a_players>
  7.  
  8.  
  9. //--------------------------// COLORS DEFINES BY IDK
  10. #define COLOR_GREEN 0x21DD00FF
  11. #define COLOR_RED 0xAA3333AA
  12. #define COLOR_YELLOW 0xFFFF00AA
  13. //---------------------------////
  14.  
  15.  
  16.  
  17.  
  18. new KillingSpree[MAX_PLAYERS];
  19.  
  20. public OnFilterScriptInit()
  21. {
  22. print("\n--------------------------------------");
  23. print(" Killing Spree");
  24. print("--------------------------------------\n");
  25. return 1;
  26. }
  27.  
  28. public OnFilterScriptExit()
  29. {
  30. return 1;
  31. }
  32.  
  33.  
  34.  
  35. main()
  36. {
  37. print("\n----------------------------------");
  38. print(" Killing Spree By Niko_boy For PK SAMP SERVER ");
  39. print("----------------------------------\n");
  40. }
  41.  
  42.  
  43.  
  44. public OnGameModeInit()
  45. {
  46.  
  47. }
  48.  
  49. public OnGameModeExit()
  50. {
  51. return 1;
  52. }
  53.  
  54.  
  55. public OnPlayerConnect(playerid)
  56. {
  57.  
  58. SendClientMessage(playerid,0x00FF00FF,"KILLING SPREE SCRIPT CREATED BY JAGAT (INGAME NAME:-Niko_boy)");
  59. SendClientMessage(playerid,0x00FF00FF,"The Script Is Distributed To Pk Servers)");
  60. KillingSpree[playerid] = 0;
  61.  
  62.  
  63.  
  64. return 1;
  65. }
  66.  
  67. public OnPlayerDeath(playerid, killerid, reason)
  68. {
  69. new string[64];
  70.  
  71. new KillingSpree[MAX_PLAYERS];
  72. new bounty[MAX_PLAYERS];
  73. KillingSpree[killerid] ++ ; // 1 kills
  74. KillingSpree[playerid] = 0; // player who died his killing spree will be restored to 0.
  75.  
  76. //------- // finds the player on a Killing Spree of 3 kills
  77. if(killerid == INVALID_PLAYER_ID)
  78. {
  79. SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
  80. }
  81. else
  82. {
  83. SendDeathMessage(killerid,playerid,reason);
  84. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  85. GivePlayerMoney(playerid,-1000);
  86. if(bounty[playerid] > 0 ) {
  87.  
  88. format(string, sizeof(string), "You earned a bounty of %d for killing %s.", bounty[playerid], playerid);
  89. SendClientMessage(killerid, COLOR_GREEN, string);
  90.  
  91. GivePlayerMoney(killerid, bounty[playerid]);
  92. bounty[playerid] = 0;
  93. }
  94.  
  95. }
  96. //==//
  97. SetPlayerWantedLevel(playerid, 0);
  98. KillingSpree[playerid] = 0;
  99. KillingSpree[killerid] ++;
  100. //--------------
  101.  
  102.  
  103. if (KillingSpree[killerid] == 20)
  104. {
  105. new name[MAX_PLAYER_NAME], string[44];
  106. GetPlayerName(killerid, name, sizeof(name));
  107. format(string, sizeof(string), "*%s for killing 20 players in row gets free 9 ammo of RPG Rocket Launcher! + 60 health & 90+ Armour!",name);
  108. SendClientMessageToAll(COLOR_GREEN,string);
  109.  
  110. new Float:health;
  111. GetPlayerHealth(killerid,health);
  112. SetPlayerHealth(killerid,health + 60);
  113.  
  114. new Float:armour;
  115. GetPlayerArmour(killerid,health);
  116. SetPlayerArmour(killerid,health + 90);
  117.  
  118. new Float:weapon ;
  119. GetPlayerWeapon (killerid,weapon);
  120. GivePlayerWeapon(killerid, 35, 9); // RPG Rocket Launcher
  121.  
  122. SendClientMessage(killerid, COLOR_GREEN, "You Are At Highest Level Of Sprees!");
  123.  
  124. }
  125.  
  126. //---------------
  127. else if (KillingSpree[killerid] == 16)
  128. {
  129.  
  130. new name[MAX_PLAYER_NAME], string[44];
  131. GetPlayerName(killerid, name, sizeof(name));
  132. format(string, sizeof(string), "*%s for killing 16 players in row gets free 7 ammo of HQ RPG Rocket Launcher! + 60 health & 80+ Armour!",name);
  133. SendClientMessageToAll(COLOR_RED,string);
  134.  
  135. new Float:health;
  136. GetPlayerHealth(killerid,health);
  137. SetPlayerHealth(killerid,health + 60);
  138.  
  139.  
  140. new Float:weapon ;
  141. GetPlayerWeapon (killerid,weapon);
  142. GivePlayerWeapon(killerid, 36, 3); // RPG Rocket Launcher
  143.  
  144. new Float:armour;
  145. GetPlayerArmour(killerid,health);
  146. SetPlayerArmour(killerid,health + 78);
  147.  
  148. new Float:money;
  149. GetPlayerMoney(killerid, money);
  150. GivePlayerMoney(killerid, 9050);
  151.  
  152. SendClientMessage(killerid, COLOR_GREEN, "You Are At About To Go To 20 KILLING SPREES!");
  153. }
  154.  
  155. else if (KillingSpree[killerid] == 12)
  156. {
  157. new name[MAX_PLAYER_NAME], string[44];
  158. GetPlayerName(killerid, name, sizeof(name));
  159. format(string, sizeof(string), "*%s for killing 12 players in row gets free ammo of M4! + 60 health & 65 Armour!",name);
  160. SendClientMessageToAll(COLOR_YELLOW,string);
  161.  
  162. new Float:health;
  163. GetPlayerHealth(killerid,health);
  164. SetPlayerHealth(killerid,health + 60);
  165.  
  166. new Float:weapon ;
  167. GetPlayerWeapon (killerid,weapon);
  168. GivePlayerWeapon(killerid,31 , 297); // m4
  169.  
  170. new Float:armour;
  171. GetPlayerArmour(killerid,health);
  172. SetPlayerArmour(killerid,health + 70);
  173.  
  174. new Float:money;
  175. GetPlayerMoney(killerid, money);
  176. GivePlayerMoney(killerid, 7500);
  177. SendClientMessage(killerid, COLOR_GREEN, "You Are At 12 killing Sprees.Next Target Is 16 kills!");
  178. }
  179.  
  180. else if (KillingSpree[killerid] == 8)
  181. {
  182. new name[MAX_PLAYER_NAME], string[44];
  183. GetPlayerName(killerid, name, sizeof(name));
  184. format(string, sizeof(string), "*%s for killing 8 players in row gets free ammo! + 60 health!",name);
  185. SendClientMessageToAll(COLOR_GREEN,string);
  186.  
  187. new Float:health;
  188. GetPlayerHealth(killerid,health);
  189. SetPlayerHealth(killerid,health + 60);
  190.  
  191. new Float:armour;
  192. GetPlayerArmour(killerid,armour);
  193. SetPlayerArmour(killerid,armour + 10);
  194.  
  195. new Float:weapon ;
  196. GetPlayerWeapon (killerid,weapon);
  197. GivePlayerWeapon(killerid, 16,7 ,24,77); // Greandes & desert eagle
  198.  
  199. new Float:money;
  200. GetPlayerMoney(killerid, money);
  201. GivePlayerMoney(killerid, 5500);
  202. SendClientMessage(killerid, COLOR_GREEN, "You Are At Highest Level Of Sprees!");
  203. }
  204.  
  205. else if (KillingSpree[killerid] == 5)
  206. {
  207. new name[MAX_PLAYER_NAME], string[44];
  208. GetPlayerName(killerid, name, sizeof(name));
  209. format(string, sizeof(string), "*%s for killing 5 players in row gets free ammo for Tec9! + 60 health!",name);
  210. SendClientMessageToAll(COLOR_GREEN,string);
  211.  
  212. new Float:health;
  213. GetPlayerHealth(killerid,health);
  214. SetPlayerHealth(killerid,health + 60);
  215.  
  216. new Float:weapon ;
  217. GetPlayerWeapon (killerid,weapon);
  218. GivePlayerWeapon(killerid, 32, 117); //
  219.  
  220. new Float:money;
  221. GetPlayerMoney(killerid, money);
  222. GivePlayerMoney(killerid, 2000);
  223.  
  224. SendClientMessage(killerid, COLOR_GREEN, "You Are At Beginig Level Of Sprees!");
  225. }
  226. if (KillingSpree[killerid] > 5)
  227. {
  228. new string[128];
  229. format(string,sizeof(string),"%s now got a killings spree of %d !!!", killerid, KillingSpree);
  230. SendClientMessageToAll(0xFF0000FF, string); print(string);
  231. }
  232.  
  233.  
  234. return 1;
  235. }
  236.  
  237. public OnPlayerText(playerid, text[])
  238. {
  239. return 1;
  240. }
  241.  
  242. public OnPlayerCommandText(playerid, cmdtext[])
  243. {
  244. if (strcmp("/ksh", cmdtext, true, 10) == 0)
  245. {
  246. // Do something here
  247. return 1;
  248. }
  249. return 0;
  250. }
Advertisement
Add Comment
Please, Sign In to add comment