Raised This Month: $ Target: $400
 0% 

Radius Damage Stock


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 07-29-2011 , 08:25   Re: Radius Damage Stock
Reply With Quote #5

Last night i also searching for radius damage stock and i found this 1 by OT:
PHP Code:
stock HamRadiusDamage(entFloat:radiusFloat:damagebits

    new 
target = -1Float:origin[3
    
pev(entpev_originorigin
     
    while(( 
target find_ent_in_sphere(targetoriginradius) )) 
    { 
        static 
Float:o[3
        
pev(targetpev_origino
         
        
xs_vec_sub(originoo
         
        
// Recheck if the entity is in radius 
        
if (xs_vec_len(o) > radius
            continue 
         
        
Ham_ExecDamageB(targetentpev(entpev_owner), damage * (xs_vec_len(o) / radius), HIT_GENERICbits
    } 

remember to define these 2 include in your sma:
PHP Code:
#include <hamsandwich>
#include <xs> 
Didn't test yet but i think it working.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo 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 00:58.


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