Raised This Month: $ Target: $400
 0% 

Block Damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 02-15-2012 , 17:36   Block Damage
Reply With Quote #1

Would this work to block damage for all players except admins?
PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if(!(
get_user_flags(attacker) & ADMIN_USER))
    {
    
//Victim is not lasermine.
    
new sz_classname[32]
    
entity_get_stringvictim EV_SZ_classname sz_classname 31 )
    if( !
equali(sz_classname,"lasermine") )
        return 
HAM_IGNORED;
    
    
//Attacker is zombie
    
if( zp_get_user_zombieattacker ) ) 
        return 
HAM_IGNORED;
    }
    
//Block Damage
    
return HAM_SUPERCEDE;

__________________
H.RED.ZONE 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 01:21.


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