I am going to assume this is multiplayer - bacause thats the more complicated scenario.
On first thought you might think that you want to run the code that moves the marker on the server, and then hide the marker on certain clients.
Its easier to run the code on every cleitn which needs to see the marker but only create LOCAL markers, ie every script command which has the word "marker" in needs a LOCAL on the end.
Be warned if you run any non-local command on a local marker, that marker becomes a public marker and will appear on EVERY client.
I've written this code off the top of my head during lunch, so it should point you in the right direction, but I don't promise that it is error free.
if ( playerSide == civilian) then {
spawn {
_markerName="markername";
_markerName createMarkerLocal [_markerName, position _unitBeingTracked ];
_markerName markerSetTypeLocal ["ICON"];
_markerName markerSetShapeLocal ["DOT"];
while { alive _unitBeingTracked } do {
__markerName MarkersetPosLocal position _unitBeingTracked;
sleep 0.5;
};// end while
};// end spawn
};// end if