My guess is that dinosaurs would have anxiously avoided the sound of gunfire, since it is loud and very strange; also, while different, I would not resemble any of a dinosaur's natural prey by smell or really by sight either. So, yeah, I'd give myself pretty good odds. Especially because, with a machine gun, I should be able to spark a fire, another thing they would be likely to avoid.