Advertisement
Guest User

Untitled

a guest
Mar 21st, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. //Kill Spree
  2. //by rocker3410
  3.  
  4. #include <a_samp>
  5.  
  6. new Spree[MAX_PLAYERS];
  7.  
  8. #define COLOR_PURPLE 0xC2A2DAAA
  9. #define COLOR_DARKBLUE 0x2641FEAA
  10.  
  11. public OnPlayerDeath(playerid, killerid, reason)
  12. {
  13. Spree[killerid]++;
  14. Spree[playerid] = 0;
  15. new string[100];
  16. if(Spree[killerid] == 10)//10 Kill Spree
  17. {
  18. format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
  19. SendClientMessageToAll(COLOR_PURPLE, string);
  20. SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 10 kills in a row. You have earned 2 score!");
  21. GivePlayerScore(killerid, 2);
  22. }
  23. else if(Spree[killerid] == 20)//20 Kill Spree
  24. {
  25. format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
  26. SendClientMessageToAll(COLOR_PURPLE, string);
  27. SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 20 kills in a row. You have earned 4 score!");
  28. GivePlayerScore(killerid, 4);
  29. }
  30. else if(Spree[killerid] == 30)//30 Kill Spree
  31. {
  32. format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
  33. SendClientMessageToAll(COLOR_PURPLE, string);
  34. SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 30 kills in a row. You earned 6 score!");
  35. GivePlayerScore(killerid, 6);
  36. }
  37. else if(Spree[killerid] == 40)//40 Kill Spree
  38. {
  39. format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
  40. SendClientMessageToAll(COLOR_PURPLE, string);
  41. SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 40 kills in a row. You earned 8 score!");
  42. GivePlayerScore(killerid, 8);
  43. }
  44. else if(Spree[killerid] == 50)//50 Kill Spree
  45. {
  46. format(string, sizeof(string), "%s is on a killing spree with %d kills.!", Name(killerid));
  47. SendClientMessageToAll(COLOR_PURPLE, string);
  48. SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 50 kills in a row. You earned 10 score!");
  49. GivePlayerScore(killerid, 10);
  50. }
  51. else if(Spree[killerid] == 60)//60 Kill Spree
  52. {
  53. format(string, sizeof(string), "%s is on a killing spree with %d kills.", Name(killerid));
  54. SendClientMessageToAll(COLOR_PURPLE, string);
  55. SendClientMessage(killerid, COLOR_DARKBLUE, "You are on a killing spree with 60 kills. You have earned 12 score!");
  56. GivePlayerScore(killerid, 12);
  57. }
  58. return 1;
  59. }
  60. stock Name(playerid)
  61. {
  62. new name[24];
  63. GetPlayerName(playerid, name, 24);
  64. return name;
  65. }
  66. stock GivePlayerScore(playerid, score)
  67. {
  68. SetPlayerScore(playerid, GetPlayerScore(playerid)+score);
  69. return 1;
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement