Thread: Block Damage
View Single Post
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 05-04-2012 , 21:44   Re: Block Damage
Reply With Quote #21

Quote:
Originally Posted by poliisi299 View Post
but, can set i cant break my own lm's ?? only T can break, coz when i shoot zombie i accidentally hit my lm, and it break.
P.S i use this in my biohazard srv (:
Well if you are useing it on biohazard there is a nativ for zombie get.
So you can set it like this.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <engine>
#include <biohazard>

#define PLUGIN    "[ZP] Addon : Laser Destroy Preventer"
#define AUTHOR    "Hezerf"
#define VERSION    "1.1"

#define ADMIN_FLAG ADMIN_ADMIN 

new gMaxPlayers;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_TakeDamage,"func_breakable","fw_TakeDamage");
    
gMaxPlayers get_maxplayers();
}

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,"lasermine") )
        return 
HAM_IGNORED;
    
    
// There is no attacker, or the attacker is zombie or an admin
    
if( !( <= attacker <= gMaxPlayers ) || is_user_zombieattacker ) || accessattackerADMIN_FLAG ) ) 
        return 
HAM_IGNORED;


//Block Damage
    
return HAM_SUPERCEDE;

PS: Best way is to edit the main laser mine plugin.
__________________

Last edited by H.RED.ZONE; 05-04-2012 at 21:45.
H.RED.ZONE is offline