Indeed, you could have kept your original code, just added a bit.
There are two ways to make sure your code is on server side.
1) /autorun/cl or /sv - obvious where.
OR
2) You used part of the idea already, but then, instead of going from from point A to point be in a straight line, you circumnavigated the globe going the same direction.
Simple use your code, but add like this
if SERVER then
... your original code ...
end
I've not tested your code, nor do I know DarkRP to know it will work, but, one step at a time, keep it simple, get it 'running' on server only.