Raised This Month: $ Target: $400
 0% 

Plugin's commands and hud messages arent shown


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-03-2020 , 04:53   Re: Plugin's commands and hud messages arent shown
Reply With Quote #4

I'm guessing you can't hook +reaload and +drop. I'm generally a server side programmer, I know very little of the engine itself.

Reload:
Quote:
Originally Posted by Bugsy View Post
If you only care about the button press then this will work:
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init() 
{
    
register_forwardFM_CmdStart "CmdStart" );
}

public 
CmdStartid uc_handle seed 
{
    static 
Buttons OldButtons;
    
    
Buttons get_ucuc_handle UC_Buttons );
    
OldButtons pevid pev_oldbuttons );
    
    if ( !( 
OldButtons IN_RELOAD ) && ( Buttons IN_RELOAD ) )
    {
        
//Reload pressed
    
}
    else if ( ( 
OldButtons IN_RELOAD ) && !( Buttons IN_RELOAD ) )
    {
        
//Reload released
    
}

Not sure about drop.

Look at other plugins you know of that are hooking those buttons and see how they do it.
__________________

Last edited by Black Rose; 08-03-2020 at 04:54.
Black Rose 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 13:49.


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