Raised This Month: $ Target: $400
 0% 

Add Admin immunity here?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wAyz
Senior Member
Join Date: Feb 2010
Location: Germany
Old 10-30-2013 , 06:33   Add Admin immunity here?
Reply With Quote #1

Hi,

I just want to add immunity to the following plugin (so that admins are not effected by blockattack). Tried several things with get_user_flags etc, but didn't succeed.

Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
	register_plugin("Block Attack", "1.0", "LeOnArD");
	
	/*Aqui poner el nombre de las armas que quieras Bloquear.
	
	Here you put the name of the weapons that you want the Block.*/
	
	RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_knife", "PrimaryAttack" );
	RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_knife", "SecondaryAttack" );
	RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_usp", "PrimaryAttack" );
	RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_usp", "SecondaryAttack" );
	
	/*Aqui estan las armas que le pueden Bloquear la Accion Secundaria.
	
	Here are the weapons that can Block the Secondary Action.*/
	
	RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_awp", "SecondaryAttack" );
	RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_scout", "SecondaryAttack" );
	RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_g3sg1", "SecondaryAttack" );
	RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_sg550", "SecondaryAttack" );
}

public PrimaryAttack( const entity )
{
	return HAM_SUPERCEDE;
}

public SecondaryAttack( const entity )
{
	return HAM_SUPERCEDE;
}

Last edited by wAyz; 10-30-2013 at 06:34.
wAyz 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 23:19.


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