Have you even tried searching: "MW2 Anti-Camp"?
You'll easily be able to find something.
And if not, some iSnipe mods do have an Anti-Camp feature. You should be able to rip that out of there and into a normal gametype easily. If you're not able to, there's plenty of tutorials to read.
EDIT:
I do think this script will do the job, although, I am on my mac atm, so I can't test:
Code:
doOwnCamper()
{
self endon("disconnect");
self endon("death");
for(;;)
{
self.before = self getorigin();
wait 18;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 50) ) {
iPrintln("^1" + (self.name) + " ^7is camping and will be killed in ^15.");
}
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 50) ) {
iPrintln("^1" + (self.name) + " ^7is camping and will be killed in ^14.");
}
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 50) ) {
iPrintln("^1" + (self.name) + " ^7is camping and will be killed in ^13.");
}
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 50) ) {
iPrintln("^1" + (self.name) + " ^7is camping and will be killed in ^12.");
}
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 50) ) {
iPrintln("^1" + (self.name) + " ^7is camping and will be killed in ^11.");
}
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 50) ) {
iPrintln("^1" + (self.name) + "^7 got killed for camping too long!");
self suicide();
}
}
}