Instead of using the built-in scrolling, call SetViewport from rep_exec to scroll the screen based on player character coordinates (or use the smooth scrolling module). That should keep it in sync as long as you update the NPC coordinates *after* you've moved the viewport.