Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4. #include <jailbreak>
  5.  
  6. #define PLUGIN "[Jail] Ganiany"
  7. #define VERSION "1.0.6"
  8. #define AUTHOR "Cypis"
  9.  
  10. new id_ganiany;
  11. new bool:usun;
  12.  
  13. public plugin_init() {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15.  
  16. id_ganiany = jail_register_game("Ganiany");
  17. }
  18.  
  19. public OnDayStartPre(day, szInfo[256], szInfo2[512], setting[10], gTimeRound)
  20. {
  21. static szTime[12];
  22. if(day == id_ganiany)
  23. {
  24. format_time(szTime, 11, "%M:%S", gTimeRound-30);
  25. formatex(szInfo2, 511, "Reglas:^n%s - Los policias empiezan a perseguir a los presos!^nEl ultimo preso tiene voluntad", szTime);
  26. szInfo = "Dzisiaj jest Ganiany";
  27.  
  28. for(new i=1; i<=MAX; i++)
  29. {
  30. if(!is_user_connected(i) || !is_user_alive(i) || get_user_team(i) != 2)
  31. continue;
  32.  
  33. strip_user_weapons(i);
  34. give_item(i, "weapon_knife");
  35. }
  36. jail_set_prisoners_micro(true, true);
  37. jail_set_ct_hit_tt(true);
  38. jail_set_god_ct(true);
  39.  
  40. setting[0] = 1;
  41. setting[1] = 1;
  42. setting[2] = 1;
  43. setting[4] = 3;
  44. }
  45. }
  46.  
  47. public OnDayStartPost(day)
  48. {
  49. if(day == id_ganiany)
  50. {
  51. jail_set_all_speed(0.1, 2) //blokowanie chodzenia ct
  52.  
  53. jail_open_cele();
  54. jail_set_game_hud(30, "Que empieze la diversion!");
  55. }
  56. }
  57.  
  58. public OnGameHudEnd(day)
  59. {
  60. if(day == id_ganiany)
  61. {
  62. if(!usun)
  63. {
  64. jail_set_ct_hit_tt(false);
  65. jail_set_all_speed(300.0, 2) //ustawienie chodzenia ct
  66.  
  67. jail_set_game_hud(300, "Se acabo el juego");
  68. }
  69. else
  70. {
  71. jail_set_play_game(USUWANIE_DANYCH, true);
  72. }
  73. usun = !usun;
  74. }
  75. }
  76.  
  77. public OnRemoveData(day)
  78. {
  79. usun = false;
  80. }
  81.  
  82. //stock
  83. stock jail_set_all_speed(Float:speed, team)
  84. {
  85. for(new i=1; i<=MAX; i++)
  86. {
  87. if(!is_user_alive(i) || !is_user_connected(i) || get_user_team(i) != team)
  88. continue;
  89.  
  90. jail_set_user_speed(i, speed);
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement