[SOLVED] Anti Camp script help!!!

Posts 1–12 of 12 · Page 1 of 1
[SOLVED] Anti Camp script help!!!
can someone help me with this ???
I have 1 big problem !!! the script works great but i want to use it on normal mods..not isnipe or other.So my problem is that when i receive a ac130 or chopper gunner killstreak..this scrip suicide my (for camping) and i cant shoot with ac130 or heli anymore.! can someone help me and modify this sript that when i have killstreaks like ac130 or chopper..to stop suicide me.but only when i have that killstreaks not every time !!

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) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^15.");
            }
            wait 1;
   self.after = self getorigin();
   if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^14.");
            }
            wait 1;
   self.after = self getorigin();
      if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^13.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^12.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^11.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + "^7 got killed for camping too long!");
            self suicide();
            }
}
}
if you dont understand something..please ask me !!
Nice code i would like to use it :D
after
Code:
wait 18;
self.after=self getOrigin()
Add
Code:
currentWeapon = self getCurrentWeapon();
                if ( currentWeapon != "ac130_105mm_mp" || "ac130_40mm_mp" || "ac130_25mm_mp" || "heli_remote_mp"  ) {
Your code here
}
EDIT: The choppergunner gun name maybe "heli_remote_mp"
EDIT 2: Did the code for ya :D
--------------------------------------------------------
Code:
doOwnCamper()
{
        self endon("disconnect");
   self endon("death");

   for(;;)
   {
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "ac130_105mm_mp" || "ac130_40mm_mp" || "ac130_25mm_mp" || "heli_remote_mp"  ) {
         self.before = self getorigin();
         wait 18;
         self.after = self getorigin();
         currentWeapon = self getCurrentWeapon();
                
            if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^15.");
            }
            wait 1;
   self.after = self getorigin();
   if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^14.");
            }
            wait 1;
   self.after = self getorigin();
      if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^13.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^12.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^11.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + "^7 got killed for camping too long!");
            self suicide();
            }
    } else {
wait 10;

}
}
}
if it works you are the best man!! I hate campers and tube noobs !!
edit 1:you forget to add one more "}" at the end of the script !!! the script keep killing me when i have chopper or ac130.I dont know why but he does!Maybe its something wrong !! Im not good at programing so i dont know!
Quote Originally Posted by adyson_19 View Post
if it works you are the best man!! I hate campers and tube noobs !!
edit 1:you forget to add one more "}" at the end of the script !!! the script keep killing me when i have chopper or ac130.I dont know why but he does!Maybe its something wrong !! Im not good at programing so i dont know!
Does it work now or did u fix it? Cuz im not sure 'bout the "heli_remote_mp"



Code:
doOwncamper1()
{
self endon ( "disconnect" )

while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "ac130_105mm_mp" || "ac130_40mm_mp" || "ac130_25mm_mp" || "heli_remote_mp"  ) {
self thread doOwnCamper();
} else {
wait 15;
}
}
}
Code:
doOwnCamper()
{
        self endon("disconnect");
   self endon("death");

   for(;;)
   {
         self.before = self getorigin();
         wait 18;
         self.after = self getorigin();
         currentWeapon = self getCurrentWeapon();
                
            if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^15.");
            }
            wait 1;
   self.after = self getorigin();
   if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^14.");
            }
            wait 1;
   self.after = self getorigin();
      if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^13.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^12.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + " ^7is camping and will be killed in ^11.");
            }
            wait 1;
   self.after = self getorigin();
         if( ( distance(self.before, self.after) < 50) ) {
            announcement("^1" + (self.name) + "^7 got killed for camping too long!");
            self suicide();
            }
}
}
Put self thread doOwncamper1();
in OnPlayerSpawn

HAVEN'T CHECKED THE CODES YET
Quote Originally Posted by House View Post
/Moved to GSC section
Shouldn't this be in the "[Help]" section?
it can b in both, it doesnt rly matter cuz its in the right section.
now i get "syntax error"
i'm not sure if heli_remote_mp it's working but i will use for tests only the ac130.But it doesnt work with ac130 because i test it .He suicide me when i have ac130 and i cant shoot anymore!
Try the other codes i wrote
Moved to help.
Quote Originally Posted by B4M View Post
Moved to help.
Knew it

And BTW check the iSnipe mods they have a Anti-Camp code in their.
I recommend the most recent one?

Code:
QuickScope()
{
	self endon ( "disconnect" );
	self endon ( "death" );
self notifyOnPlayerCommand("[{+toggleads_throw}]", "+toggleads_throw");
	while(1) {
		self waittill("[{+toggleads_throw}]");
		wait 0.3;
		self allowADS(false);
		self allowADS(true);
		self allowADS(false);
		self allowADS(true);		 
		wait 0.0005; }
They used my code in it This put a smile on my face

back to the topic:

Code:
AntiCamp()
{
        self endon("disconnect");
	self endon("death");

	for(;;)
	{
			self.before = self getorigin();
			wait 1000;
			self.after = self getorigin();
			
				if( ( distance(self.before, self.after) < 100) ) {
				announcement("^1" + (self.name) + " ^7is camping and will be killed in ^15.");
				}
				wait 1;
	self.after = self getorigin();
	if( ( distance(self.before, self.after) < 100) ) {
				announcement("^1" + (self.name) + " ^7is camping and will be killed in ^14.");
				}
				wait 1;
	self.after = self getorigin();
		if( ( distance(self.before, self.after) < 100) ) {
				announcement("^1" + (self.name) + " ^7is camping and will be killed in ^13.");
				}
				wait 1;
	self.after = self getorigin();
			if( ( distance(self.before, self.after) < 100) ) {
				announcement("^1" + (self.name) + " ^7is camping and will be killed in ^12.");
				}
				wait 1;
	self.after = self getorigin();
			if( ( distance(self.before, self.after) < 100) ) {
				announcement("^1" + (self.name) + " ^7is camping and will be killed in ^11.");
				}
				wait 1;
	self.after = self getorigin();
			if( ( distance(self.before, self.after) < 100) ) {
				announcement("^1" + (self.name) + "^7 got killed for camping too long!");
				self suicide();
				}
}
}
/marked as solved
if its solved..why it doesnt work ???
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us