Raised This Month: $ Target: $400
 0% 

Damage Grenade


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
raducuursu
Junior Member
Join Date: Sep 2012
Old 03-03-2014 , 09:32   Damage Grenade
Reply With Quote #1

Hi
I have a problem with the zombie plague, grenade explode


I sometimes appears
Damge to Name :: -23 dmg
Damge to Name :: -12 dmg
Damge to Name :: -3 dmg
Damge to Name :: -7 dmg

but must as a minimum be 0

but I look and positive numbers

look at the source
Quote:
// Set damage
static id, name[32], distance, Float:damage
id = entity_get_edict(ent, EV_ENT_owner)
get_user_name(victim, name, charsmax(name))
distance = floatround(entity_range(ent, victim))
damage = get_pcvar_float(cvar_explosedamage)-(get_pcvar_float(cvar_explosedamage)/NADE_EXPLOSION_RADIUS)*float(distance)
fm_set_user_health(victim, pev(victim, pev_health) - floatround(damage))
zp_colored_print(id, "%s Damage to^x03 %s^x01 ::^x04 %i damage", CHAT_PREFIX, name, floatround(damage))
and

Quote:
// Explosion radius for custom grenades
const Float:NADE_EXPLOSION_RADIUS = 240.0
Thanks
raducuursu is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode