Raised This Month: $ Target: $400
 0% 

How to catch holding fire button


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
matsi
Thinkosaur
Join Date: Sep 2006
Old 09-06-2012 , 14:30   Re: How to catch holding fire button
Reply With Quote #4

Quote:
Originally Posted by Torge View Post
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>

public client_PreThink(id)
{
    new 
button;
    
button pev(idpev_button);
    
    if (
button IN_ATTACK)
    {
        
// Your code
    
}

Not sure if it works too for holding, but you can try it.
Thats exactly how it will work and if you want to check if player just pressed attack once you must check old_buttons as well... FYI Prethink is not the correct way to check buttons.
__________________

Accepting all kinds of requests via private message.
matsi 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 08:20.


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