Guest User

Untitled

a guest
Oct 23rd, 2012
577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <fakemeta_util>
  4.  
  5. // Define the Plugin Version
  6. new const VERSION[] = "1.0";
  7.  
  8. // PREFIX
  9. new const PREFIX[] = "[ JailBreak ]";
  10.  
  11. const CountSeconds = 60;
  12.  
  13. new g_iCountTime,g_MaxPlayers;
  14.  
  15. public plugin_init(){
  16. register_plugin("JailBreak Day", VERSION, "Dyamons & CheezPuff [NorToN edit]");
  17.  
  18. register_clcmd("say /menu","JBDay")
  19. register_clcmd("say /days","JBDay")
  20. register_logevent( "LEV_RoundEnd", 2, "1=Round_End" )
  21.  
  22. g_MaxPlayers = get_maxplayers();
  23. }
  24.  
  25. public LEV_RoundEnd()
  26. remove_task()
  27.  
  28. public Count() {
  29. set_hudmessage( 0 , 255 , 0 , -1.0 , 0.28 , 2 , 1.1 , 1.1 , 0.01 , 0.01 );
  30. show_hudmessage( 0 , "Prisoners Have: %d seconds -Left to Hide" , g_iCountTime-- );
  31. }
  32.  
  33. public JBDay(id){
  34.  
  35. if(cs_get_user_team(id) != CS_TEAM_CT)
  36. return;
  37.  
  38. new menu = menu_create("\yJailBreak Game Day:^n\rby Dyamons & CheezPuff", "menu_handler");
  39.  
  40. menu_additem(menu, "\wZombie Day", "1", 0);
  41. menu_additem(menu, "\wSpartan Day", "2", 0);
  42. menu_additem(menu, "\wFree Day", "3", 0);
  43. menu_additem(menu, "\wCage Day", "4", 0);
  44. menu_additem(menu, "\wKnife Day", "5", 0);
  45. menu_additem(menu, "\wWar Day", "6", 0);
  46. menu_additem(menu, "\wHide Day", "7", 0);
  47.  
  48. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  49. menu_display(id, menu, 0);
  50.  
  51. }
  52.  
  53. public menu_handler(id, menu, item){
  54.  
  55. if( item == MENU_EXIT )
  56. {
  57. menu_destroy(menu);
  58. return;
  59. }
  60.  
  61. new data[6], iName[64];
  62. new access, callback;
  63.  
  64. menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
  65.  
  66. new key = str_to_num(data);
  67.  
  68. switch(key)
  69. {
  70. case 1: ZombieDay()
  71. case 2: SpartanDay()
  72. case 3: client_print( 0, print_chat, "%s Free Day! NO GUN ROOM!", PREFIX)
  73. case 4: client_print( 0, print_chat, "%s Cage Day! ALL TO CAGE!", PREFIX)
  74. case 5: KnifeDay()
  75. case 6: WarDay()
  76. case 7: HideDay()
  77. }
  78.  
  79. menu_destroy(menu);
  80. }
  81.  
  82. public ZombieDay(){
  83. for( new i = 1; i <= g_MaxPlayers; i++ )
  84. {
  85. if( !is_user_alive( i ) )
  86. continue;
  87.  
  88. client_print( 0, print_chat, "%s Zombie Day has started", PREFIX)
  89.  
  90. fm_strip_user_weapons( i )
  91.  
  92. fm_give_item( i, "weapon_knife" )
  93.  
  94. switch(cs_get_user_team(i))
  95. {
  96. case CS_TEAM_T:
  97. {
  98. fm_give_item(i, "weapon_m249")
  99. cs_set_weapon_ammo( CSW_M249, 100 )
  100. cs_set_user_bpammo( i, CSW_M249, 9999 )
  101. }
  102.  
  103. case CS_TEAM_CT: fm_set_user_health(i, 32000);
  104.  
  105. }
  106. }
  107. }
  108.  
  109. public SpartanDay(){
  110.  
  111. for( new i = 1; i <= g_MaxPlayers; i++ )
  112. {
  113. if( !is_user_alive( i ) )
  114. continue;
  115.  
  116. client_print( 0, print_chat, "%s Spartan has started", PREFIX)
  117.  
  118. switch(cs_get_user_team(i))
  119. {
  120. case CS_TEAM_T:
  121. {
  122. fm_strip_user_weapons( i )
  123.  
  124. fm_give_item( i, "weapon_knife" )
  125. fm_give_item( i, "weapon_deagle")
  126. fm_give_item( i, "weapon_shield")
  127. cs_set_weapon_ammo( CSW_DEAGLE, 7 )
  128. cs_set_user_bpammo( i, CSW_DEAGLE, 35 )
  129. }
  130. }
  131. }
  132. }
  133.  
  134. public KnifeDay(){
  135. for( new i = 1; i <= g_MaxPlayers; i++ )
  136. {
  137. if( !is_user_alive( i ) )
  138. continue;
  139.  
  140. client_print( 0, print_chat, "%s Knife Day! FIGHT!!!", PREFIX)
  141.  
  142. fm_strip_user_weapons( i )
  143. fm_give_item( i, "weapon_knife" )
  144. }
  145. }
  146.  
  147. public WarDay(){
  148. for( new i = 1; i <= g_MaxPlayers; i++ )
  149. {
  150. if( !is_user_alive( i ) )
  151. continue;
  152.  
  153. client_print( 0, print_chat, "%s War Day! FIGHT!!!", PREFIX)
  154.  
  155. fm_strip_user_weapons( i)
  156. fm_give_item(i, "weapon_knife")
  157. fm_give_item(i, "weapon_m3")
  158. cs_set_weapon_ammo( CSW_M3, 8 )
  159. cs_set_user_bpammo( i, CSW_M3, 32 )
  160. }
  161. }
  162.  
  163. public HideDay(){
  164. client_print( 0, print_chat, "%s Hide Day! HIDE!!!", PREFIX)
  165.  
  166. g_iCountTime = CountSeconds;
  167. set_task( 1.0 , "Count" , _ , _ , _ , "a" , g_iCountTime );
  168. }
Advertisement
Add Comment
Please, Sign In to add comment