Quote:
Originally Posted by zmd94
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(PLUGIN, VERSION, AUTHOR)
register_forward(FM_CmdStart, "FwdCmdStart");
// Add your code here...
}
public FwdCmdStart(id, uc_handle)
{
static Button, OldButtons;
Button = get_uc(uc_handle, UC_Buttons);
OldButtons = pev(id, pev_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?