Sign in to follow this  
Followers 0
atrX

Anti Spawn Camp

15 posts in this topic

Since I'm sick of seeing people camp at spawn *cough* factory *cough*, here's a little plugin I wrote.

Create a new .gsc and name it "anti_spawn_camp.gsc", put in in your plugins folder and paste this into it:

// Anti Spawn Camp plugin by JR-Imagine / GCZ|Slaya
// Special thanks to Darmuh for fixing some stuff

//	      _ _____      _____                       _            
//	     | |  __ \    |_   _|                     (_)           
//	     | | |__) |_____| |  _ __ ___   __ _  __ _ _ _ __   ___ 
//	 _   | |  _  /______| | | '_ ` _ \ / _` |/ _` | | '_ \ / _ \
//	| |__| | | \ \     _| |_| | | | | | (_| | (_| | | | | |  __/
//	 \____/|_|  \_\   |_____|_| |_| |_|\__,_|\__, |_|_| |_|\___|
//	                                          __/ |             
//	                                         |___/  

init( modVersion )
{
	if( !MapExceptionList() )
	{
		// Edit these numbers to your likings
		level.anti_camp_interval = 15;
		level.anti_camp_radius = 1248;

		level waittill( "activator" );
		
		players = GetEntArray("player","classname");
		for(i=0;i<players.size;i++)
		{
			if( players[i].pers["team"] == "allies" )
				players[i] thread anti_camp();
		}
	}
}

anti_camp()
{
	self.origin_start = self.origin;
	
	while( isAlive( self ) )
	{
		wait 30;
		wait(level.anti_camp_interval);

		if( Distance2D( self.origin_start, self.origin ) < level.anti_camp_radius )
		{
			self iPrintlnBold("^9Anti Spawn Camp: ^3You have " + level.anti_camp_interval + " seconds to get your ass out of spawn!");

			wait(level.anti_camp_interval);

			if( Distance2D( self.origin_start, self.origin ) < level.anti_camp_radius )
			{
				self iPrintlnBold("^9Anti Spawn Camp: ^3You were warned!");
				wait 1;
				self Suicide();
			}
		}
	}
}

MapExceptionList()
{
	return isSubStr( "twitch highrise", braxi\_maps::getMapNameString( level.mapName ) );
}

Now open "_plugins.gsc" and add this line in the main() function:

LoadPlugin( plugins\anti_spawn_camp::init, "Anti Spawn Camp", "GCZ|Slaya" );

Edit: Added a MapExceptionList() function (thanks Darmuh) for maps like Twitch and Highrise.

0

Share this post


Link to post
Share on other sites

Good work imagine, if only i came up with that idea :/ cuz i want to make another plugin too :okay:

0

Share this post


Link to post
Share on other sites

Edit: Added a MapExceptionList() function (thanks Darmuh) for maps like Twitch and Highrise.

np

edit: added to server

25845b2d0e8ff9cabb4c5112b1b2dd1c.png

0

Share this post


Link to post
Share on other sites

edit: added to server

25845b2d0e8ff9cabb4c5112b1b2dd1c.png

Lol, would've loved to see that live. xD

0

Share this post


Link to post
Share on other sites

Well, players that were saying it killed them later in the map were incorrect

 

Turns out that the 15 seconds to move out of spawn sometimes appear for them later in the map, however doesn't kill them

 

Guess that may clear up any of the confusion why players keep saying it's killing them

0

Share this post


Link to post
Share on other sites

Great plugin! But I think you should add a second exception function for maps with longer startups e.g. terror, easy, flow.

 

So if current map is x map wait 25 seconds then thread 'acti_camp'.

 

Maybe also think about a dynamic spawn radius kinda thing for maps with traps very near to the spawn... or maybe they could just come under the longer wait.

0

Share this post


Link to post
Share on other sites

Didn't expect this to actually be any good but it's a really really really awesome feature!

0

Share this post


Link to post
Share on other sites

Add dvars for the values nubile (<- dunno what that means, my phone suggested that instead of nub :dumb:)

Oh I see :troll:

Edited by Bear
0

Share this post


Link to post
Share on other sites

Ok, this sounds like a good plugin idea but the way you've done it is bad.

 

Problems:

 

It kills players throughout the map, which the DR mod itself already has so therefor it can causes bugs such as dead players being alive and killing jumpers.

 

Radius on default is way to big on certain maps.

 

Suggestion

 

Make this work for maps with a certain target name so then mappers can add it to their map by just making a trigger_multiple and give it a certain targetname, and then maps that don't have it you can spawn you can make triggers and give them a targetname, i know that method isn't the best but this plugin doesn't live up to it's name and that way is better than a plugin which is a smaller version of DR built in AFK script.

0

Share this post


Link to post
Share on other sites

Good idea, spawn campers / trollers are always annoying to wait for :) Thanks  ^_^

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0