Raised This Month: $ Target: $400
 0% 

Register "+command" from client?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DavidJr
Senior Member
Join Date: Apr 2012
Old 01-27-2014 , 05:17   Re: Register "+command" from client?
Reply With Quote #1

If you want to hook reload, you can detect reload button with fakemeta like this:

PHP Code:
#define XO_PLAYER 5
#define m_afButtonPressed 246

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
}

public 
client_PreThink(id)
{
    new 
iButtonPressediButtonReleased;
    
iButtonPressed get_pdata_int(idm_afButtonPressedXO_PLAYER);
    
    if (
iButtonPressed IN_RELOAD)
    {
        
//do something here;
    
}

__________________
What are you looking for here?

Last edited by DavidJr; 01-27-2014 at 05:18.
DavidJr 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:10.


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