Put a FLAG in your base, give it the name HFLAG
Make a script file for EACH player (If you are in multiplayer and using respawn, because the objectname changes with respawn). In each script put the following.
#dist
~0.1
?((p1 distance hflag) > radius): p1 setpos (getpos hflag)
goto "dist"
You will need to name each player p1, p2. p3 etc, and update the script accordingly... RADIUS is how far away in metres the player can travel. Remember this radius includes z axis (elevation) so if the dist is 1000, and a unit flys 1000m in the air, it will be teleported back to base.
Ciao Ciao
Adam