Thread: Damage Grenade
View Single Post
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 03-03-2014 , 13:54   Re: Damage Grenade
Reply With Quote #3

Code:
// Set damage static id, damage id = entity_get_edict(ent, EV_ENT_owner) // damage lower than 1 has no point, so we round it down damage = floatround(get_pcvar_float(cvar_explosedamage) - (get_pcvar_float(cvar_explosedamage) / NADE_EXPLOSION_RADIUS) * entity_range(ent, victim), floatround_floor) // the target is out of the explosion range if (!damage)     return; // max CS name lenght is 31, not 32 static name[31] get_user_name(victim, name, 30) fm_set_user_health(victim, pev(victim, pev_health) - damage) zp_colored_print(id, "%s Damage to^x03 %s^x01 ::^x04 %d damage", CHAT_PREFIX, name, damage)
__________________

Last edited by georgik57; 03-03-2014 at 13:58.
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57