Raised This Month: $ Target: $400
 0% 

Block Attack2 in defined weapons.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 07-25-2010 , 15:31   Block Attack2 in defined weapons.
Reply With Quote #1

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>

	

public plugin_init() {
	register_forward(FM_CmdStart,"Attack")
	register_plugin("Sample", "1.0", "Gadzik :*")
}

public Attack(player, handle, seed)
{
	if(!is_user_alive(player)) return FMRES_IGNORED
	new weapon = get_user_weapon(player)
	new button = get_uc(handle,UC_Buttons)
	if(weapon == CSW_SCOUT)	
		{
			return FMRES_IGNORED
		}
		else	
		{
		if(button & IN_ATTACK2) {
			button &= ~IN_ATTACK2
			set_uc(handle,UC_Buttons,button)
						}
					}
}
Well, another question.
I want to block every weapon zoom (or other attack2 function) but scout.
It still blocks every weapon, scout too.
So what's wrong here?

Last edited by Gadzislaw007; 07-25-2010 at 15:33. Reason: mistake in code
Gadzislaw007 is offline
 


Thread Tools
Display Modes

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 00:18.


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