Hey.
I need that this plugin (bullet damage) should show and received damage, not only done, but I'm not so good at it and asking for help.
Here is the code:
Code:
#include <amxmodx>
new g_HudSyncObj;
public plugin_init()
register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
public plugin_cfg()
g_HudSyncObj = CreateHudSyncObj();
public Damage(Cl)
{
static Attacker;
Attacker = get_user_attacker(Cl);
if (get_user_flags(Attacker) & ADMIN_LEVEL_H)
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
}
}
I tryed to fill with this code in the end:
Code:
#else
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
{
new damage = read_data(2)
#endif
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)
And it looks like this:
Code:
#include <amxmodx>
new g_HudSyncObj;
public plugin_init()
register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
public plugin_cfg()
g_HudSyncObj = CreateHudSyncObj();
public Damage(Cl)
{
static Attacker;
Attacker = get_user_attacker(Cl);
if (get_user_flags(Attacker) & ADMIN_LEVEL_H)
{
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
#else
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
{
new damage = read_data(2)
#endif
set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)
But I get 5 or 6 errors... Whats wrong?