msi morkva
Участник
- Сообщения
- 319
- Реакции
- 36
#include <sourcemod>
public OnPluginStart()
{
HookEvent("player_hurt", CallBackEvent, EventHookMode_Post);
}
public CallBackEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new heatlh = GetEventInt(event, "health");
new i_Teamattacker = GetClientTeam(attacker);
if (i_Teamattacker > 1)
if (GetClientTeam(victim) != i_Teamattacker)
if(heatlh > 0)
{
decl String:Heatlh[4];
IntToString(heatlh, Heatlh, 4);
new Handle:panel = CreatePanel();
SetPanelTitle(panel, Heatlh);
SendPanelToClient(panel, attacker, z, 1);
}
}
public z(Handle:panel, MenuAction:action, client, option)
{
}
Переделать или до делать?спс!!!!!!!!!!!!!!!!! вам огромное! выручили! вот хотел уточнить а есть возможно сделать по середине чтобы высвечивалось? как например в show damage ?
#include <sourcemod>
public OnPluginStart()
{
HookEvent("player_hurt", CallBackEvent, EventHookMode_Post);
}
public CallBackEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new heatlh = GetEventInt(event, "health");
new i_Teamattacker = GetClientTeam(attacker);
if (i_Teamattacker > 1)
if (GetClientTeam(victim) != i_Teamattacker)
if(heatlh > 0)
{
PrintHintText(attacker, "%d", heatlh);
}
}
#include <sourcemod>
public OnPluginStart()
{
HookEvent("player_hurt", CallBackEvent, EventHookMode_Post);
}
public CallBackEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new heatlh = GetEventInt(event, "health");
if (attacker > 0)
{
new i_Teamattacker = GetClientTeam(attacker);
if (i_Teamattacker > 1)
if (GetClientTeam(victim) != i_Teamattacker)
if(heatlh > 0)
{
decl String:Heatlh[4];
IntToString(heatlh, Heatlh, 4);
new Handle:panel = CreatePanel();
SetPanelTitle(panel, Heatlh);
SendPanelToClient(panel, attacker, z, 1);
PrintHintText(attacker, "%d", heatlh);
}
}
}
public z(Handle:panel, MenuAction:action, client, option)
{
}
#include <sourcemod>
#define VERSION "0.4"
public Plugin:myinfo =
{
name = "Health enemy",
author = "aktel (HLModders.ru LLC)",
description = "The showing of the enemy's health",
version = VERSION,
url = "http://www.hlmod.ru/"
};
public OnPluginStart()
{
HookEvent("player_hurt", CallBackEvent, EventHookMode_Post);
}
public CallBackEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new heatlh = GetEventInt(event, "health");
if (attacker > 0)
{
new i_Teamattacker = GetClientTeam(attacker);
if (i_Teamattacker > 1)
if (GetClientTeam(victim) != i_Teamattacker)
if(heatlh > 0)
{
PrintHintText(attacker, "%d", heatlh);
}
}
}
public z(Handle:panel, MenuAction:action, client, option)
{
}
#include <sourcemod>
#define VERSION "0.5"
public Plugin:myinfo =
{
name = "Health enemy",
author = "aktel, msi morkva (HLModders.ru LLC)",
description = "The showing of the enemy's health",
version = VERSION,
url = "http://www.hlmod.ru/"
};
public OnPluginStart()
{
HookEvent("player_hurt", CallBackEvent, EventHookMode_Post);
}
public CallBackEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new heatlh = GetEventInt(event, "health");
if (attacker > 0)
{
new i_Teamattacker = GetClientTeam(attacker);
if (i_Teamattacker > 1)
if (GetClientTeam(victim) != i_Teamattacker)
if(heatlh > 0)
{
PrintHintText(attacker, "Осталось %d HP", heatlh);
}
}
}
public z(Handle:panel, MenuAction:action, client, option)
{
}