hi.. can someone help me with this.. i want this pluging to show the damage someone is doing to me, cuz now it just shows me the damage i do..
i want it to show them both but i cant do it..
this is the original code:
Code:
#include <amxmodx>
public damage_msg(vIndex)
{
if ( get_cvar_float("bullet_damage") ) {
new aIndex = get_user_attacker(vIndex)
new damage = read_data(2)
client_print(aIndex, print_center,"%i", damage)
}
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("Bullet Damage","1.0","f117bomb")
register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")
register_cvar("bullet_damage","1")
return PLUGIN_CONTINUE
}
this is what i tryed with no results:
Code:
#include <amxmodx>
public damage_msg(vIndex)
{
if ( get_cvar_float("bullet_damage") ) {
new aIndex = get_user_attacker(vIndex)
new damage = read_data(2)
client_print(aIndex, print_center,"%i", damage)
}
else if ( get_cvar_float("bullet_damage") ) {
new aIndex = get_user_attacker(vIndex)
new damage = read_data(1)
client_print(aIndex, print_center,"%i", damage)
}
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("Bullet Damage","1.0","f117bomb")
register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")
register_cvar("bullet_damage","1")
return PLUGIN_CONTINUE
thanx a lot!