Raised This Month: $ Target: $400
 0% 

Fakemeta Radius damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-28-2007 , 03:08   Re: Fakemeta Radius damage
Reply With Quote #10

oh yea lol. Try this one if it damages anyother players instead of you.

PHP Code:
stock radius_damage(attacker, const Float:origin[3], Float:max_damagedamage_typeFloat:radius)
{
 new 
id = -1
 
static Float:player_origin[3], Float:distanceFloat:damage
 
while((id engfunc(EngFunc_FindEntityInSphereidoriginradius)) != 0)
 {
  if(!
is_user_alive(id) || id == attacker
   continue
 
  
pev(idpev_originplayer_origin)
 
  
distance get_distance_f(originplayer_origin)
  
damage max_damage - ((max_damage radius) * distance)
 
  new 
entity engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"trigger_hurt"))
  if(
entity)
  {
   new 
value[16]
   
float_to_str(damage 2value15)
   
dispatch_keyvalue(entity"dmg"value)
 
   
num_to_str(damage_typevalue15)
   
dispatch_keyvalue(entity"damagetype"value)
   
dispatch_keyvalue(entity"origin""8192 8192 8192")
 
   
dllfunc(DLLFunc_Spawnentity)
   
dllfunc(DLLFunc_Touchentityid)
 
   
engfunc(EngFunc_RemoveEntityentity)
  }
 }
}
stock dispatch_keyvalue(entity, const key[], const value[])
{
 static 
classname[32]
 
pev(entitypev_classnameclassname31)
 
 
set_kvd(0KV_ClassNameclassname)
 
set_kvd(0KV_KeyNamekey)
 
set_kvd(0KV_Valuevalue)
 
set_kvd(0KV_fHandled0)
 
 return 
dllfunc(DLLFunc_KeyValueentity0)

__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit 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 10:39.


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