Raised This Month: $32 Target: $400
 8% 

Block Damage


Post New Thread Reply   
 
Thread Tools Display Modes
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 02-16-2012 , 10:44   Re: Block Damage
Reply With Quote #11

Quote:
Originally Posted by Exolent[jNr] View Post
To anything specific like players, lasermines, etc.?
Or they can be the only players to deal damage to anything?
Only lasermines.
Like this, lot of players don't respect rules so i want to block them that they can't destroy lasermines but i want Admin to be able to destroy lasermines that are not set correctly.
__________________
H.RED.ZONE is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 11:11   Re: Block Damage
Reply With Quote #12

PHP Code:
#define ADMIN_FLAG ADMIN_ADMIN

new gMaxPlayers;

public 
plugin_init() {
    
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 ) || zp_get_user_zombieattacker ) || accessattackerADMIN_FLAG ) ) 
        return 
HAM_IGNORED;
    }
    
    
//Block Damage
    
return HAM_SUPERCEDE;

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 02-16-2012 , 12:36   Re: Block Damage
Reply With Quote #13

You mean like this? i get errors cant compile
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <zombieplague>

#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 ) || zp_get_user_zombieattacker ) || accessattackerADMIN_FLAG ) ) 
        return 
HAM_IGNORED;
    }
    
    
//Block Damage
    
return HAM_SUPERCEDE;

__________________
H.RED.ZONE is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-16-2012 , 12:40   Re: Block Damage
Reply With Quote #14

Code:
#include <amxmodx> #include <amxmisc> #include <hamsandwich> #include <engine> #include <zombieplague> #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 ) || zp_get_user_zombie( attacker ) || access( attacker, ADMIN_FLAG ) )         return HAM_IGNORED; //Block Damage     return HAM_SUPERCEDE; }

leave to add the include amxmisc.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
poliisi299
Senior Member
Join Date: May 2011
Old 05-04-2012 , 14:57   Re: Block Damage
Reply With Quote #15

Can you do it ?, but work in normal mod, not zombie plague
poliisi299 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 05-04-2012 , 15:09   Re: Block Damage
Reply With Quote #16

Old thread but here.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <engine>

#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 ) || accessattackerADMIN_FLAG ) ) 
        return 
HAM_IGNORED;


//Block Damage
    
return HAM_SUPERCEDE;

__________________
H.RED.ZONE is offline
poliisi299
Senior Member
Join Date: May 2011
Old 05-04-2012 , 15:24   Re: Block Damage
Reply With Quote #17

Thank but, can add no admins only ?
poliisi299 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-04-2012 , 15:29   Re: Block Damage
Reply With Quote #18

Change admin flag to ADMIN_ALL.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
poliisi299
Senior Member
Join Date: May 2011
Old 05-04-2012 , 15:34   Re: Block Damage
Reply With Quote #19

Thanks.
poliisi299 is offline
Old 05-04-2012, 16:08
ConnorMcLeod
This message has been deleted by ConnorMcLeod. Reason: meh
poliisi299
Senior Member
Join Date: May 2011
Old 05-04-2012 , 16:47   Re: Block Damage
Reply With Quote #20

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 (:

Last edited by poliisi299; 05-04-2012 at 16:49.
poliisi299 is offline
Reply



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 04:46.


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