Raised This Month: $ Target: $400
 0% 

Need help with the get_user_button(id)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-05-2009 , 06:23   Re: Need help with the get_user_button(id)
Reply With Quote #4

You don't need button for this.

PHP Code:
#include <amxmodx>

public plugin_init()
{

    
register_clcmd("drop""ClientCommand_Drop")
}

public 
ClientCommand_Dropid )
{
    if( 
is_user_alive(id) && get_user_weapon(id) == CSW_KNIFE )
    {
        
// execute your code here


        
return PLUGIN_HANDLED // this prevent the message "can't drop this weapon" from showing
    
}
    return 
PLUGIN_CONTINUE

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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:31.


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