Hey,
I wish to detect if a player is holding down +attack / +attack2
I think I can use -
register_forward( FM_CmdStart, "CmdStart" )
And then something like:
PHP Code:
public CmdStart(id)
{
if(!g_custom_model[id]) return FMRES_IGNORED;
if(pev(id, pev_button) & ATTACK) // is this the right button? :p
{
//other stuff here
}
return FMRES_SUPERCEDE; //This does block +attack right?
}
Also, will CmdStart be called as the user holds the button down. Or is it on press and release?
Thanks for the help <3