Raised This Month: $ Target: $400
 0% 

block special attack2 [solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 09-30-2007 , 00:05   block special attack2 [solved]
Reply With Quote #1

how can i block the special attack button that changes the mode of the weapon like semi automatic burst mode...... silencer on off?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME

Last edited by kp_uparrow; 09-30-2007 at 18:29.
kp_uparrow is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-30-2007 , 05:24   Re: block special attack
Reply With Quote #2

Check what you want, then put this command :

Code:
set_pev( id , pev_button , pev( id , pev_button ) & ~IN_ATTACK2 )
ConnorMcLeod is offline
l33tnewb
BANNED
Join Date: Sep 2007
Old 09-30-2007 , 05:26   Re: block special attack
Reply With Quote #3

i think he means _special or the special console command
l33tnewb is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 09-30-2007 , 12:19   Re: block special attack
Reply With Quote #4

no i mean +attack2, ill try the code
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
l33tnewb
BANNED
Join Date: Sep 2007
Old 09-30-2007 , 12:24   Re: block special attack
Reply With Quote #5

oh should have sed attack2
l33tnewb is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 09-30-2007 , 18:27   Re: block special attack
Reply With Quote #6

lol, the code works, just the little text and animation shows up before its canceld because of lag
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 10-01-2007 , 05:11   Re: block special attack
Reply With Quote #7

Quote:
Originally Posted by kp_uparrow View Post
the little text and animation shows up
Code:
 
public plugin_init()
{
 register_forward(FM_UpdateClientData, "forward_updateclientdata", 1);
}
 
public forward_updateclientdata(id, sendweapons, cd_handle)
{
 if(!is_user_alive(id))
  return FMRES_IGNORED;
 new const weapon = get_user_weapon(id);
 
 if(weapon == CSW_AUG || weapon == CSW_GLOCK18 || weapon == CSW_M4A1 || weapon == CSW_USP || weapon == CSW_FAMAS || weapon == CSW_SG552) // || weapon == CSW_KNIFE
 {
  new const button = pev(id, pev_button);
  if(button & IN_ATTACK2 && !(button & IN_ATTACK))
   set_cd(cd_handle, CD_flNextAttack, halflife_time() + 0.01);
  return FMRES_HANDLED;
 }
 return FMRES_IGNORED;
}

Last edited by potatis_invalido; 10-01-2007 at 05:21.
potatis_invalido 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 07:57.


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