static Button, OldButton; Button = pev( id, pev_button ); OldButton = pev( id, pev_oldbuttons ); if( ( OldButton & IN_ATTACK ) && !( Button & IN_ATTACK ) ) //fire weapon here