you must give your character a varible for direction.
if right pressed set direction variable to right.
if left pressed set direction variabla to left.
on fire button pressed and direction is right then
spawn bullet set bullet direction angle of motion 0 degrees
on fire button pressed and direction is left then
spawn bullet set bullet direction angle of motion 180 degrees