Raised This Month: $ Target: $400
 0% 

How to check player hold right mouse then release


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
snack_koo
Junior Member
Join Date: Jan 2012
Old 11-16-2014 , 20:40   Re: How to check player hold right mouse then release
Reply With Quote #5

Quote:
Originally Posted by zmd94 View Post
Just try again. Yet, please follow the sequence given. ;)
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_CmdStart"FwdCmdStart");
    
    
// Add your code here...
}
public 
FwdCmdStart(iduc_handle)
{
    static 
ButtonOldButtons;
    
Button get_uc(uc_handleUC_Buttons);
    
OldButtons pev(idpev_oldbuttons);
 
    if((
Button IN_ATTACK2) && !(OldButtons IN_ATTACK2))
    {
        
// Player presses right click
    
server_print("right click")
    }
   
    if((
Button IN_ATTACK2) && (OldButtons IN_ATTACK2))
    {
        
// Player is holding down right click
    
server_print("holding")
    }
    
    if(!(
Button IN_ATTACK2) && (OldButtons IN_ATTACK2))
    {
        
// Player releases right click
    
server_print("release")
    }

I'd tried like this way
never see right-click event appear! what wrong?
snack_koo 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 17:28.


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