Hello!
Here I have this code:
Code:
stock UTIL_Damage(attacker, victim, Float:fDamage, damagebits, ent = 0, const szWeapon[] = ""){
static info_target = 0;
if(!info_target)
info_target = engfunc(EngFunc_AllocString, "info_target");
if(pev_valid(ent))
ExecuteHamB(Ham_TakeDamage, victim, ent, attacker, fDamage, damagebits);
else{
ent = engfunc(EngFunc_CreateNamedEntity, info_target);
set_pev(ent, pev_classname, szWeapon);
ExecuteHamB(Ham_TakeDamage, victim, ent, attacker, fDamage, damagebits);
set_pev(ent, pev_flags, FL_KILLME);
}
}
Code:
UTIL_Damage(attacker, victim, 40.0, (1<<1), attacker, "");
So yes, it displays the DMG, as well as attacking the victim sees it. But how to do that in the upper right corner of display skull, not a weapon with which they killed but that I must see the DMG of skill.
Cause i'm using this for skills in my mod.
If i make ent = 0 i don't see DMG, but see skull, but if i make ent = attacker i see DMG, but see too weapon witch i killed.