Advertisement
BM_R1KO

Untitled

Jul 9th, 2017
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int g_iStamp;
  2. Game_Hide()
  3. {
  4.     new hd_wait_time = GetConVarInt(FindConVar("hd_wait_time"));
  5.     for (int i = 1; i <= MaxClients; ++i)
  6.     {
  7.         if(IsClientInGame(i) && IsPlayerAlive(i))
  8.         {
  9.             CGOPrintToChat(i, "\x03[Day Games] \x01Прятки начнутся через %d секунд", hd_wait_time);
  10.            
  11.             switch(GetClientTeam(i))
  12.             {
  13.             case 2:
  14.                 {
  15.                     CGOPrintToChat(i, "\x03[Day Games] \x01Найдите себе подходящие местечко.");
  16.                     CGOPrintToChat(i, "\x03[Day Games] {RED}Чтобы выбрать скин введите !mask");
  17.                     CGOPrintToChat(i, "\x03[Day Games] {GREEN}Через минуту, как вы спрячитесь, {RED}охрана начнет поиск.");  
  18.                     g_PropsMenu.Display(i,20);
  19.                     TiB_SetThirdPerson(i, true);
  20.                 }
  21.             case 3:
  22.                 {
  23.                     CGOPrintToChat(i, "\x03[Day Games] \x01Прятки начнутся через %d секунд", hd_wait_time);
  24.                     CGOPrintToChat(i, "\x03[Day Games] \x01Заключенные прячутся.");
  25.                     CGOPrintToChat(i, "\x03[Day Games] {GREEN}Через минуту вы снова будете видеть!");    
  26.                     SetEntityMoveType(i, MOVETYPE_NONE);
  27.                     TeleportEntity(i, NULL_VECTOR, NULL_VECTOR, NULL_VELOCITY);
  28.                     ScreenFade(i, hd_wait_time, FFADE_IN|FFADE_PURGE);
  29.                 }
  30.             }      
  31.         }
  32.     }
  33.     g_blackscreen = true;
  34.     SwitchDiezelMode(true);
  35.     OpenAllDoors();
  36.     g_iStamp = GetTime()+hd_wait_time;
  37.     g_hTerTimer = CreateTimer(5.0, Timer_HideStart, _, TIMER_REPEAT);
  38. }
  39.  
  40. public Action Timer_HideStart(Handle timer)
  41. {
  42.     if(GetConVarInt(FindConVar("hd_wait_time"))) > 0)
  43.     {
  44.         PrintCenterTextAll("До начала игры %d секунд", g_iStamp-GetTime());
  45.         return Plugin_Continue;
  46.     }
  47.    
  48.     for(int i = 1; i <= MaxClients; ++i)
  49.     {
  50.         switch(GetClientTeam(i))
  51.         {
  52.         case 2:
  53.             {
  54.                 SetEntityHealth(i, 200);
  55.             }
  56.         case 3:
  57.             {
  58.                 ScreenFade(i, 10, FFADE_OUT|FFADE_PURGE, -1, 0, 0, 0, 0);
  59.                 TeleportEntity(i, NULL_VECTOR, NULL_VECTOR, NULL_VELOCITY);
  60.                 SetEntityMoveType(i, MOVETYPE_WALK);
  61.                 SetEntityHealth(i, 100);
  62.             }
  63.         }
  64.     }
  65.     CGOPrintToChatAll("\x03[Day Games] {GREEN} GO! GO! GO! {RED}Прятки начались!");
  66.     SwitchDiezelMode(false);
  67.     g_blackscreen = false;
  68.     g_hCtTimer = CreateTimer(5.0, Timer_ProcessHide, _, TIMER_REPEAT);
  69.    
  70.     g_hCtTimer = null;
  71.     return Plugin_Stop;
  72.    
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement