Hi,
I trying to do that script show how much damage I done for another player.
Here is a code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
public plugin_init() {
register_event("Damage", "eDamage", "b", "2!0", "3=0", "4!0")
// Damage stuff
g_hudmsg1 = CreateHudSyncObj()
g_hudmsg2 = CreateHudSyncObj()
}
public eDamage(id) {
if (PlayerDamage[id]) {
static attacker; attacker = get_user_attacker(id)
static damage; damage = read_data(2)
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)
}
}
PlayerDamage[id] == 1
but this show for me only if someone did damage to me and display, but not what I did for another player. If I throw HE to my self, it's show how much I done damage to my self (victim), and how much done (attacker).
That's wrong with this one? Anyone maybe can help?