Quote:
Originally Posted by poliisi299
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(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage,"func_breakable","fw_TakeDamage");
gMaxPlayers = get_maxplayers();
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type) {
//Victim is not lasermine.
new sz_classname[32]
entity_get_string( victim , 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( !( 1 <= attacker <= gMaxPlayers ) || is_user_zombie( attacker ) || access( attacker, ADMIN_FLAG ) )
return HAM_IGNORED;
//Block Damage
return HAM_SUPERCEDE;
}
PS: Best way is to edit the main laser mine plugin.
__________________