Raised This Month: $ Target: $400
 0% 

Grenade think 2 calls


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 11-18-2014 , 11:52   Grenade think 2 calls
Reply With Quote #1

PHP Code:

public fw_think(ent)

    static 
Float:dmgtime
         pev
(entpev_dmgtimedmgtime)     
    if (
dmgtime get_gametime()) return HAM_IGNORED
    
          
    
if(is_he(ent))
    {      
           
server_print("HE THINK")
      
heowner get_pdata_int(ent414
      static 
Float:or[3]
      
pev(ent,pev_origin,or)
      new 
target = -1
      
static  Float:flDistanceFloat:flDamage
      
while(( target find_ent_in_sphere(target, or, grenadelvl[heowner]*50.0) ))  
           {  
                     if(!
alive(target)) continue            
             
            
flDistance entity_range(enttarget );
                    
flDamage UTIL_FloatRadius100.0grenadelvl[heowner]*50.0flDistance );            
            
ExecuteHamB(Ham_TakeDamagetargetentheowner flDamage /* flDamage/protectlvl[target] */ DMG_GRENADE
            
server_print("radius %.2f damage %.2f"grenadelvl[heowner]*50.0flDamage)            
            }
        
        }
       

Debug says it called 2 times. how call it once at grenade explosion moment
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 11-18-2014 at 13:57.
avril-lavigne 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 17:32.


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