| 
				
				Сколько кт и т
				 | 
 | 
| 
Foxik
 | 
Дата: Четверг, 02.04.2020, 14:08:15 | Сообщение # 1 |  
  
  |  
Сообщений: 15
 
Репутация: 0 [ +/- ]
 |   
 | 
 Здравствуйте есть ли такой плагин чтобы внизу экрана показывало сколько кт и т остались живых? 
 | 
 
|   | 
 |    | 
| 
alex123pavlov
 | 
Дата: Пятница, 03.04.2020, 10:58:13 | Сообщение # 2 |  
  
  |  
Сообщений: 29
 
Репутация: 1 [ +/- ]
 |   
 | 
Код new Handle:GAP_Timer; new x; new xx;
  public OnPluginStart() {     ServerCommand("sv_hudhint_sound 0");     HookEvent("round_start", Event_RoundStart);     HookEvent("round_end", Event_RoundEnd); }
  public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) {     x = 0;     xx = 0;     if (GAP_Timer != INVALID_HANDLE)     {         KillTimer(GAP_Timer);         GAP_Timer = INVALID_HANDLE;     }     GAP_Timer = CreateTimer(1.0, GAP_TimerTell, _, TIMER_REPEAT); }
  public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) {     x = 0;     xx = 0;     if (GAP_Timer != INVALID_HANDLE)     {         KillTimer(GAP_Timer);         GAP_Timer = INVALID_HANDLE;     } }
  public Action:GAP_TimerTell(Handle:timer) {     x = 0;     xx = 0;     for (new i = 1; i <= MaxClients; i++)     {         if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2)         {             x++;         }     }     for (new i = 1; i <= MaxClients; i++)     {         if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 3)         {             xx++;         }     }     PrintHintTextToAll("%d T:%d CT", x, xx);     return Plugin_Continue; }
   
 | 
 
|   | 
 |    | 
| 
Foxik
 | 
Дата: Пятница, 03.04.2020, 17:15:53 | Сообщение # 3 |  
  
  |  
Сообщений: 15
 
Репутация: 0 [ +/- ]
 |   
 | 
 alex123pavlov, Спасибо огромное,а не подскажешь как к примеру двигать текст,например не внизу экрана а наверху в середине,читал что можно через hud но в css34 не работает hud 
 | 
 
|   | 
 |    | 
| 
alex123pavlov
 | 
Дата: Пятница, 03.04.2020, 20:15:59 | Сообщение # 4 |  
  
  |  
Сообщений: 29
 
Репутация: 1 [ +/- ]
 |   
 | 
ТРЕБОВАНИЕ: http://world-source.ru/forum/141-3804-1
  КАК ТО ТАК НАВЕРНОЕ
 
 Код #include <easy_hudmessage>
  new Handle:GAP_Timer; new x; new xx;
  public OnPluginStart() {     ServerCommand("sv_hudhint_sound 0");     HookEvent("round_start", Event_RoundStart);     HookEvent("round_end", Event_RoundEnd); }
  public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) {     x = 0;     xx = 0;     if (GAP_Timer != INVALID_HANDLE)     {         KillTimer(GAP_Timer);         GAP_Timer = INVALID_HANDLE;     }     GAP_Timer = CreateTimer(1.0, GAP_TimerTell, _, TIMER_REPEAT); }
  public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast) {     x = 0;     xx = 0;     if (GAP_Timer != INVALID_HANDLE)     {         KillTimer(GAP_Timer);         GAP_Timer = INVALID_HANDLE;     } }
  public Action:GAP_TimerTell(Handle:timer, client) {     x = 0;     xx = 0;     for (new i = 1; i <= MaxClients; i++)     {         if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2)         {             x++;         }     }     for (new i = 1; i <= MaxClients; i++)     {         if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 3)         {             xx++;         }     }     //PrintHintTextToAll("%d T:%d CT", x, xx);     SendHudMessage(client, 5, -1.0, -0.8, 0xFF0000FF, 0x00FF00FF, 2, 0.2, 0.2, 3.0, 1.0, "%d T:%d CT", x, xx);     return Plugin_Continue; }  
 | 
 
|   | 
 |    | 
| 
Brodyaga73
 | 
Дата: Суббота, 04.04.2020, 14:03:01 | Сообщение # 5 |  
  
  |  
Сообщений: 10
 
Репутация: 1 [ +/- ]
 |   
 | 
 alex123pavlov, А можно ли какой нибудь легкий код чтобы показывало только лишь хп?А худ вроде как точно на старых версиях не робит 
 | 
 
|   | 
 |    | 
| 
alex123pavlov
 | 
Дата: Воскресенье, 05.04.2020, 10:41:27 | Сообщение # 6 |  
  
  |  
Сообщений: 29
 
Репутация: 1 [ +/- ]
 |   
 | 
 хп показывало чье? Свое? 
 | 
 
|   | 
 |    | 
| 
Brodyaga73
 | 
Дата: Воскресенье, 05.04.2020, 11:45:35 | Сообщение # 7 |  
  
  |  
Сообщений: 10
 
Репутация: 1 [ +/- ]
 |   
 | 
 alex123pavlov, Да 
 | 
 
|   | 
 |    | 
| 
Tokami2
 | 
Дата: Воскресенье, 05.04.2020, 16:49:53 | Сообщение # 8 |  
  
  |  
Сообщений: 20
 
Репутация: 6 [ +/- ]
 |   
 | 
Brodyaga73, попробуй
 
 Код  #include <sourcemod>
  new Handle:g_HpTimer[MAXPLAYERS+1] = INVALID_HANDLE;
  public OnPluginStart() {     HookEvent("player_spawn", Event_PlayerSpawn); }
  public Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) {     new client = GetClientOfUserId(GetEventInt(event, "userid"));     if(client > 0)     {   if(g_HpTimer[client] == INVALID_HANDLE) g_HpTimer[client] = CreateTimer(0.1, Timer_Spawn, client, TIMER_REPEAT);     } }
  public Action:Timer_Spawn(Handle:timer, any:client) {     if(!IsClientInGame(client)) return Plugin_Stop;          if(IsPlayerAlive(client)) PrintHintText(client, "Ваше HP = %d", GetClientHealth(client));     else      {   PrintHintText(client, "Вы умерли");   g_HpTimer[client] = INVALID_HANDLE;   return Plugin_Stop;     }          return Plugin_Continue; }
 
 
  
 
 Сообщение отредактировал Tokami2 - Воскресенье, 05.04.2020, 16:50:55  | 
 
|   | 
 |    |