About writing AI... just think like the enemy (be the enemy) and write to code what You'll do at his position to kill (win with) You. Let the enemy thinking like human, what to do? maybe run, maybe hide, if hide so were and how (maybe fast or maybe stay down, very slow and quiet), or maybe call my friends, or attack himself if I have good opportunity... etc.
This is the hardest part of programming... to write a really good and natural looking AI.
But if you making a serious-same don't worry... vec_to_angle to player, and go ahead, and if in range shoot until die;) And of AI
