Raised This Month: $ Target: $400
 0% 

Prevent take damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Killer zm
Senior Member
Join Date: Jun 2011
Old 04-24-2012 , 11:03   Prevent take damage
Reply With Quote #1

I have this code
PHP Code:
public plugin_init() 

    
RegisterHam(Ham_TakeDamage,"func_wall","fw_TakeDamage"); 


public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type

    
//Victim is not lasermine. 
    
new sz_classname[32
    
entity_get_stringvictim EV_SZ_classname sz_classname 31 
    if( !
equali(sz_classname,"amxx_pallets") ) 
        return 
HAM_IGNORED
     
    
//Attacker is zombie 
    
if( zp_get_user_zombieattacker )&& is_user_aliveinflictor ) )  
        return 
HAM_IGNORED
     
    
//Block Damage 
    
return HAM_SUPERCEDE

An player put in zombie mode sanbags and zombie can destroy this sandbags and another player human coming and shot in the sandabgs he cant destroy but I want the player who put the sandbags to make can destroy sandbags I put there && is_user_alive( inflictor ) but not working why?

Last edited by Killer zm; 04-24-2012 at 11:06.
Killer zm 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 07:52.


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