Advertisement
KingOfVC

spree

Aug 18th, 2014
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. //===================================== Spree System ====================================================//
  2. function GetPlayerSpree(player)
  3. {
  4. return status[player.ID].KillingSpree;
  5. }
  6. function SetPlayerSpree(player)
  7. {
  8. status[player.ID].KillingSpree = 0;
  9. }
  10. function IncPlayerSpree(player)
  11. {
  12. status[player.ID].KillingSpree = GetPlayerSpree(player);
  13. }
  14. function DecPlayerSpree(player)
  15. {
  16. status[player.ID].KillingSpree = GetPlayerSpree(player);
  17. }
  18. //==============================================================================
  19. function StartKillingSpree( player )
  20. {
  21. if ( GetPlayerSpree( player ) >= 5 )
  22. {
  23. local kills = GetPlayerSpree(player);
  24. if ( kills == 5 ) spi( "[Spree] - " + player + " is on a killing spree with " + kills + " kills in a row!!!" );
  25. else if ( kills == 10 ) spi( "[Spree] - " + player + " is on a killing spree with " + kills + " kills in a row!! " );
  26. else if ( kills == 15 ) spi( "[Spree] - " + player + " is on a killing spree with " + kills + " kills in a row!! " );
  27. else if ( kills == 20 ) spi( "[Spree] - " + player + " is on a killing spree with " + kills + " kills in a row!! " );
  28. else if ( kills == 25 ) spi( "[Spree] - " + player + " is on a killing spree with " + kills + " kills in a row!!! " );
  29. else if ( ( kills >= 30 ) && ( kills % 5 == 0 ) ) spi( "[Spree] - " + player + " is on a killing spree with " + kills + " kills in a row!!! " );
  30. }
  31. }
  32. //==============================================================================
  33. function EndKillingSpree( p1, p2 )
  34. {
  35. if ( GetPlayerSpree( p1 ) >= 5 )
  36. {
  37. if ( p2 == 255 )
  38. {
  39. EMessage("[Spree] - Noob " + p1.Name + " he has ended their own killing spree.");
  40. DecPlayerSpree(p1, GetPlayerSpree(p1));
  41. }
  42. else if ( p2 != 255 )
  43. {
  44. EMessage( "[Spree] - " + p2.Name + " ended " + p1.Name + "'s killing spree of " + GetPlayerSpree(p1) + " kills in a row.");
  45. DecPlayerSpree(p1, GetPlayerSpree(p1));
  46. IncCash( p2, 1500 );
  47. PrivMessage( "[Spree] - You have ended the killing spree of " + p1.Name + "", p2 );
  48. }
  49. }
  50. }
  51.  
  52. //============================= End Of Spree System =====================================================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement