if( (get_user_button(id) & IN_ATTACK2) && !(get_user_oldbutton(id) & IN_ATTACK2) && (user_has_weapon(id, CSW_M3, 1)) ) { myFunction(id); }