Doom-like 8-directional sprites... but in multiplayer

So, I want to make enemies like the ones in Doom, in the sense that they are 2D sprites, and depending at what angle you are facing them, their sprite changes to that corresponding sprite.

I can do that with a script… if it was singleplayer. I want to add multiplayer. Imagine I have an enemy, and two players facing it from the front and back. How can I make the enemy show player1 the front and player2 the back?

You would do that exactly like you do in single player. Sync the position and rotation of the enemies over the network and calculate the sprite locally for each player