Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugn] Kill Harvester Console Commands
[SSGM 4.0 Plugn] Kill Harvester Console Commands [message #461506] Tue, 10 January 2012 09:48 Go to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
This simple plugin adds two console commands to the FDS to allow for destroying both teams' harvester.

killharvgdi ;Destroys the GDI harvester.
killharvnod ;Destroys the Nod harvester.

You can contact me by PM'ing me on renegadeforums.com under the name "iRANian" or on the usual IRC servers under the nick "Iran".


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Mon, 02 July 2012 06:44]

Report message to a moderator

Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #461654 is a reply to message #461506] Fri, 13 January 2012 07:58 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
why lol i guess bots could use it for somthing.

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #461655 is a reply to message #461654] Fri, 13 January 2012 08:09 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
Pretty much, both Jelly and st0rm can use this.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #461774 is a reply to message #461506] Mon, 16 January 2012 14:24 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

This is actually quite useful; n00bstories has an internet interface on which you can blow up any of a team's vehicles, including the harvester. This has its uses in certain situations, such as when two days ago I was playing Under on Jelly Marathon and somebody got the GDI harv stuck on a rock in the tib field. As a result, even after several minutes of pushing it around with vehicles, it still came back to the rock and we had no credits coming in (we were holding Nod back inside their base at the time, so they weren't about to do anything to it). Quite an annoying bug, and this would be the perfect fix.

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #461776 is a reply to message #461506] Mon, 16 January 2012 14:54 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
Another annoying spot is the light post next to the Airstrip door, if you get a Harvester stuck there people can't get inside of the building.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #463589 is a reply to message #461774] Sun, 04 March 2012 13:19 Go to previous messageGo to next message
Creed3020 is currently offline  Creed3020
Messages: 1438
Registered: February 2003
Location: Toronto, Canada
Karma: 0
General (1 Star)
Ethenal wrote on Mon, 16 January 2012 16:24

This is actually quite useful; n00bstories has an internet interface on which you can blow up any of a team's vehicles, including the harvester. This has its uses in certain situations, such as when two days ago I was playing Under on Jelly Marathon and somebody got the GDI harv stuck on a rock in the tib field. As a result, even after several minutes of pushing it around with vehicles, it still came back to the rock and we had no credits coming in (we were holding Nod back inside their base at the time, so they weren't about to do anything to it). Quite an annoying bug, and this would be the perfect fix.


The scenario you described is exactly why we have this ability to blow up the harvester.

Nice work iRANian, this is a useful set of commands for the whole community.
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #463590 is a reply to message #461506] Sun, 04 March 2012 13:43 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
The actual programming part of this simple plugin only took 2 minutes and involved copy pasting functions around that I've used for the Reset Match (!ready command used by cw.cc) plugin and another plugin that added console commands. Actually getting a new plugin started (you need to follow a lot of steps to create a new plugin coding project) and writing the readme took around 15 minutes.

It's quite amazing how easily some of these issues are to fix, I wrote a beacon deploy sound spamming plugin in 20 minutes of actual programming, and I'm intending to release it after it's been tested (it does some fancy stuff with timers to reset a counter), 45 minutes total to detect a really annoying exploit.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #470502 is a reply to message #461506] Mon, 02 July 2012 06:41 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
Updated the plugin so it works with beta 5.

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489014 is a reply to message #461506] Thu, 14 August 2014 23:37 Go to previous messageGo to next message
Catalyst is currently offline  Catalyst
Messages: 139
Registered: March 2009
Karma: 0
Recruit
Bump D:
any chance of an update for the latest 4.0 ?
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489025 is a reply to message #461506] Fri, 15 August 2014 20:10 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
Someone make this man a plugin from these example commands please.

class CommandKILLVEHICLES :
	public ConsoleFunctionClass
{
public:
	const char* Get_Name() 
	{ 
		return "killvehicles"; 
	}
	const char* Get_Help() 
	{ 
		return "KILLVEHICLES - Destroys all vehicles."; 
	}
	void Activate(const char* argumentsString)
	{
		int count = 0;

		for (SLNode<VehicleGameObj> *x = GameObjManager::VehicleGameObjList.Head();x;x = x->Next()) 
		{
			VehicleGameObj *veh = x->Data();
			Vector3 pos = Commands->Get_Position(veh);
			if ( Functions::IsTank_Obj(veh) )
			{
				Commands->Destroy_Object(veh);
				Commands->Create_Explosion("Explosion_with_Debris_small",pos,veh);
				count++;
			}
		}

		if ( count >= 1 )
		{
			Console_Output("[BB] All Vehicle's Destroyed.\n");
		}
	}
};

class CommandKILLVEHICLE :
	public ConsoleFunctionClass
{
public:
	const char* Get_Name() 
	{ 
		return "killvehicle"; 
	}
	const char* Get_Help() 
	{ 
		return "KILLVEHICLE <clientId> - Destroy a player's vehicle."; 
	}
	void Activate(const char* argumentsString)
	{
		CommandLineParser arguments(argumentsString);
		const char* clientIdentifier = arguments.getString();

		if (!clientIdentifier || clientIdentifier[0] == '\0')
			Console_Output("Please enter a client identifier.");
		else
		{
			const int clientId = getClientIdByIdentifier(clientIdentifier);
			if (!isClientId(clientId))
			{
				Console_Output("Please enter a valid client identifier.");
			}
			else
			{
				int killtype = arguments.getInt();
				GameObject *obj = Get_GameObj(clientId);
				GameObject *Veh = Get_Vehicle(obj);
				Vector3 pos = Commands->Get_Position(obj);

				if (Veh)
				{
					if (Get_Vehicle_Driver(Veh) == obj) 
					{
						if (killtype == 1)
						{
							Commands->Apply_Damage(Veh,99999.0f,"BlamoKiller",0);
						}
						else
						{
							Commands->Destroy_Object(Veh);
							Commands->Create_Explosion("Explosion_with_Debris_small",pos,obj);
						}
						Console_Output("[BB] Player's Vehicle Destroyed.\n");
					}
				}
			}
		}
	}
};

class CommandKILL :
	public ConsoleFunctionClass
{
public:
	const char* Get_Name() 
	{ 
		return "Kill"; 
	}
	const char* Get_Help() 
	{ 
		return "KILL <clientId> <killtype> - Kills the player's character (if they're driving a vehicle it will kill that too)."; 
	}
	void Activate(const char* argumentsString)
	{
		CommandLineParser arguments(argumentsString);
		const char* clientIdentifier = arguments.getString();

		if (!clientIdentifier || clientIdentifier[0] == '\0')
			Console_Output("Please enter a client identifier.");
		else
		{
			const int clientId = getClientIdByIdentifier(clientIdentifier);
			if (!isClientId(clientId))
			{
				Console_Output("Please enter a valid client identifier.");
			}
			else
			{
				int killtype = arguments.getInt();
				GameObject *obj = Get_GameObj(clientId);
				GameObject *Veh = Get_Vehicle(obj);
				Vector3 pos = Commands->Get_Position(obj);

				if (Veh)
				{
					if (Get_Vehicle_Driver(Veh) == obj) 
					{
						Commands->Destroy_Object(obj);
						Commands->Destroy_Object(Veh);
						Commands->Create_Explosion("Explosion_with_Debris_small",pos,obj);
					}
				}

				if (PData[clientId]->Spectating == true)
				{
					Console_Output("[BB] Player %ls cannot be killed while in spectate mode. Use !spectate command.\n",Get_Wide_Player_Name(Get_GameObj(clientId)));
					return;
				}

				if ( obj )
				{
					if(!killtype)
					{
						Commands->Apply_Damage(obj,99999.0f,"BlamoKiller",obj);
						Console_Output("Player has killed theirself.");
						Commands->Create_2D_WAV_Sound("humiliation.wav");
					}
					else if(killtype == 1)
					{
						Commands->Destroy_Object(obj);
						Console_Output("[BB] Player has been killed silently.");
					}
					else if(killtype == 2)
					{
						Commands->Destroy_Object(obj);
						Set_Deaths(clientId, Get_Deaths(clientId) - 1);
						Console_Output("[BB] Player has been killed silently no death.");
					}
					else 
					{
						Commands->Apply_Damage(obj,99999.0f,"BlamoKiller",0);
						Console_Output("Player has been killed.");
					}
				}
			}
		}
	}
};

class CommandKILLHARV :
	public ConsoleFunctionClass
{
public:
	const char* Get_Name() 
	{ 
		return "killharv"; 
	}
	const char* Get_Help() 
	{ 
		return "KILLHARV <team> - Destroy a team harvester."; 
	}
	void Activate(const char* argumentsString)
	{
		StringClass OriginalString = argumentsString;
		CommandLineParser arguments(argumentsString);
		int team = arguments.getInt();
		if ( !team )
		{
			Console_Output("Please enter a valid team ID.\n");
		}
		else
		{
			Functions::Kill_Harvester(team);
		}

	}
};

void Functions::Kill_Harvester(int Team)
{
	SLNode<SmartGameObj> *x = GameObjManager::SmartGameObjList.Head();
	while (x)
	{
		GameObject *o = x->Data();
		if (o)
		{
			if (o->As_VehicleGameObj())
			{
				int TeamType = Commands->Get_Player_Type(o);
				if (TeamType == Team)
				{
					if (Is_Harvester(o) || Is_Harvester_Preset(o))
					{
						Commands->Destroy_Object(o);
						//Commands->Apply_Damage(o,99999,"Death",0);
					}					
				}
			}
		}
		x = x->Next();
	}
}



http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Fri, 15 August 2014 20:10]

Report message to a moderator

Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489027 is a reply to message #461506] Fri, 15 August 2014 20:31 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
You pasted the function but couldn't edit the plugin, wtf blacky LOL? Dont Get It

http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489028 is a reply to message #461506] Fri, 15 August 2014 20:41 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
I have been making plugins in dragonade and dont have script build setup for 4.0 or 4.1 at the moment.

http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Fri, 15 August 2014 20:43]

Report message to a moderator

Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489029 is a reply to message #461506] Fri, 15 August 2014 22:36 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
Ahh ok. I'd do it, but it won't be done till Monday. Don't have my tools on this computer.

http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489082 is a reply to message #461506] Tue, 19 August 2014 16:07 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
K updated plugin.

It's just 1 console command "KILLHARV <TEAM ID>"

I didn't test it but I'm pretty sure it works. Source and DLL included.


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder

[Updated on: Sat, 23 August 2014 13:55]

Report message to a moderator

Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489091 is a reply to message #461506] Wed, 20 August 2014 08:15 Go to previous messageGo to next message
Catalyst is currently offline  Catalyst
Messages: 139
Registered: March 2009
Karma: 0
Recruit
Cheers Works.
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489099 is a reply to message #461506] Sat, 23 August 2014 07:02 Go to previous messageGo to next message
Catalyst is currently offline  Catalyst
Messages: 139
Registered: March 2009
Karma: 0
Recruit
Hey Xpert,

only problem:

>killharv 0
>Please enter a valid team ID.

>killharv 1
>GDI's Harvester has been destroyed.

>killharv 2
>Please enter a valid team ID. 1 for GDI and 0 for Nod.

doesn't seem to recognize 0 as a team?
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489101 is a reply to message #461506] Sat, 23 August 2014 13:56 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
Haha, I put 2 if statements that do the same thing.

I fixed it and edited the file. Re-download it.


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489104 is a reply to message #461506] Sun, 24 August 2014 04:29 Go to previous messageGo to next message
Catalyst is currently offline  Catalyst
Messages: 139
Registered: March 2009
Karma: 0
Recruit
Great Smile Works!
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489106 is a reply to message #461506] Mon, 25 August 2014 08:56 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
Oh good. Thanks xpert.

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: [SSGM 4.0 Plugn] Kill Harvester Console Commands [message #489121 is a reply to message #489106] Thu, 28 August 2014 03:31 Go to previous message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
Gen_Blacky wrote on Mon, 25 August 2014 08:56

Oh good. Thanks xpert.

Previous Topic: [SSGM Plugin] CheckPlayerName
Next Topic: UltraAOW NewMaps Mappack v20.0
Goto Forum:
  


Current Time: Fri Apr 19 06:05:16 MST 2024

Total time taken to generate the page: 0.01055 seconds