PHP Code:
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
new const PLUGIN [] = "Mostrar Dano",
VERSION [] = "1.2",
AUTHOR [] = "Syturio"
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
new g_hudmsg1, g_hudmsg2
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
g_hudmsg1 = CreateHudSyncObj()
g_hudmsg2 = CreateHudSyncObj()
}
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
public on_damage(id)
{
static attacker; attacker = get_user_attacker(id)
static damage; damage = read_data(2)
// Lever dano (Vermelho)
set_hudmessage(255, 0, 0, 0.535, 0.49, 2, 0.1, 5.5, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_hudmsg2, "%i", damage)
// Dar dano (Azul)
set_hudmessage(0, 100, 200, 0.450, 0.49, 2, 0.1, 5.5, 0.1, 0.1, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i", damage)
if(!is_user_alive(id))
{
new target = pev(id, pev_iuser2)
if(!target)
return
// Lever dano (Vermelho)
set_hudmessage(255, 0, 0, 0.535, 0.49, 2, 0.1, 5.5, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_hudmsg2, "%i", damage)
// Dar dano (Azul)
set_hudmessage(0, 100, 200, 0.450, 0.49, 2, 0.1, 5.5, 0.1, 0.1, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i", damage)
}
}
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////