You don't need button for this.
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd("drop", "ClientCommand_Drop")
}
public ClientCommand_Drop( id )
{
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
}
__________________