Raised This Month: $ Target: $400
 0% 

Check if button is released


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
darktemplar
Member
Join Date: Sep 2009
Old 04-29-2013 , 21:58   Check if button is released
Reply With Quote #1

Hi ,
I want to make a special weapon, you press E to change to Charge Mode, after that, to active the special function, you have to hold Attack button, when you want to open your fire, you release it

The problem I have is how can I check if IN_ATTACK released?
Can someone give me a solution ?
darktemplar is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-29-2013 , 22:23   Re: Check if button is released
Reply With Quote #2

Something like this in a think forward:
Code:
    static Button, OldButton;         Button = pev( id, pev_button );     OldButton = pev( id, pev_oldbuttons );         if( ( OldButton & IN_ATTACK ) && !( Button & IN_ATTACK ) )         //fire weapon here
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet 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 10:52.


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