Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [Plug-in] SSGM2.02 Commander BETA  () 1 Vote
Re: [Plug-in] SSGM2.02 Commander BETA [message #383995 is a reply to message #383990] Sat, 02 May 2009 15:04 Go to previous messageGo to next message
Prulez is currently offline  Prulez
Messages: 439
Registered: August 2005
Location: The Netherlands
Karma: 0
Commander
Gen_Blacky wrote on Sat, 02 May 2009 22:45

if you make another release of this plugin make it so msg don't spam when there are no players.

Dude, redownload. He already fixed that.


Also:
(18:34:26) (&PruCoop) DeathC200: !pollcommander DeathC200
(18:34:34) (&PruCoop) Initializing Westwood Online Mode
(18:34:36) (&PruCoop) Logging onto USA Server
(18:34:37) (&PruCoop) Creating game channel...
(18:34:37) (&PruCoop) Channel created OK
(18:34:38) (&PruCoop) Loading level Skirmish00.mix
(18:34:39) (&PruCoop) Level loaded OK

Server crashed when he did that, I've added you on MSN reborn.


http://i32.tinypic.com/2j1rey8.png

nikki6ixx wrote on Fri, 08 May 2009 19:47

Every so often, I get this positive feeling that humanity can somehow, possibly attain pure awesomeness, and enlightenment, and that there is light at the end of the road for us all. However, I only need to go to the latest HUD thread at RenForums to remind me of how dumb I was for thinking such stupid things.

[Updated on: Sat, 02 May 2009 15:05]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #384017 is a reply to message #383047] Sat, 02 May 2009 18:08 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
didn't know

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: [Plug-in] SSGM2.02 Commander BETA [message #384040 is a reply to message #383047] Sun, 03 May 2009 00:35 Go to previous messageGo to next message
havoc9826 is currently offline  havoc9826
Messages: 562
Registered: April 2006
Location: California, USA
Karma: 0
Colonel
I just found another command related to team commander that I completely forgot about. In BC, if there was no commander assigned and noone was successfully voted commander, a mod could !assumecommand.

http://img82.imageshack.us/img82/8886/CommandoSig.jpg
Re: [Plug-in] SSGM2.02 Commander BETA [message #384042 is a reply to message #383047] Sun, 03 May 2009 00:46 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)
True, but the plugin isn't connected to a server regulator.

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: [Plug-in] SSGM2.02 Commander BETA [message #384051 is a reply to message #383047] Sun, 03 May 2009 01:32 Go to previous messageGo to next message
Prulez is currently offline  Prulez
Messages: 439
Registered: August 2005
Location: The Netherlands
Karma: 0
Commander
2 more crashes:

[02:49:24] <PruCoop> [Team] Kingbobom: !pollcommander kingbobom
[02:49:26] <PruCoop> Initializing Westwood Online Mode

[22:35:50] <PruCoop> [Team] ferret840: !pollcommander ferret840
[22:35:53] <PruCoop> Initializing Westwood Online Mode



http://i32.tinypic.com/2j1rey8.png

nikki6ixx wrote on Fri, 08 May 2009 19:47

Every so often, I get this positive feeling that humanity can somehow, possibly attain pure awesomeness, and enlightenment, and that there is light at the end of the road for us all. However, I only need to go to the latest HUD thread at RenForums to remind me of how dumb I was for thinking such stupid things.

[Updated on: Sun, 03 May 2009 01:33]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #384078 is a reply to message #383047] Sun, 03 May 2009 05:00 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
I have no idea why its doing that. If you give me the crash dump I will see if a friend can take a look at it. If they can see why it's happening then I will try to fix the problem.
I wish I could read crash dumps to be honest...



Re: [Plug-in] SSGM2.02 Commander BETA [message #384127 is a reply to message #384051] Sun, 03 May 2009 11:56 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
Prulez wrote on Sun, 03 May 2009 01:32

2 more crashes:

[02:49:24] <PruCoop> [Team] Kingbobom: !pollcommander kingbobom
[02:49:26] <PruCoop> Initializing Westwood Online Mode

[22:35:50] <PruCoop> [Team] ferret840: !pollcommander ferret840
[22:35:53] <PruCoop> Initializing Westwood Online Mode



Are they the only people in-game?
Re: [Plug-in] SSGM2.02 Commander BETA [message #384148 is a reply to message #384127] Sun, 03 May 2009 14:30 Go to previous messageGo to next message
Prulez is currently offline  Prulez
Messages: 439
Registered: August 2005
Location: The Netherlands
Karma: 0
Commander
Zack wrote on Sun, 03 May 2009 20:56

Prulez wrote on Sun, 03 May 2009 01:32

2 more crashes:

[02:49:24] <PruCoop> [Team] Kingbobom: !pollcommander kingbobom
[02:49:26] <PruCoop> Initializing Westwood Online Mode

[22:35:50] <PruCoop> [Team] ferret840: !pollcommander ferret840
[22:35:53] <PruCoop> Initializing Westwood Online Mode



Are they the only people in-game?

I don't know, I'll try to get related crashdumps ASAP.
Can't really log on the box now, unfortunately.


http://i32.tinypic.com/2j1rey8.png

nikki6ixx wrote on Fri, 08 May 2009 19:47

Every so often, I get this positive feeling that humanity can somehow, possibly attain pure awesomeness, and enlightenment, and that there is light at the end of the road for us all. However, I only need to go to the latest HUD thread at RenForums to remind me of how dumb I was for thinking such stupid things.
Re: [Plug-in] SSGM2.02 Commander BETA [message #384716 is a reply to message #383047] Wed, 06 May 2009 23:13 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
if the player was a commander and changed teams it will still say that the player is the commander for that team he was originally on. The commander proxie aura doesn't work in 1.1, worked in 1.0 ,its set on in the .ini. When the agt reports damage it says the damage is like 5984565464


ExEric3 wrote on Tue, 28 April 2009 11:01

It's incompatible with Resurrection. Angry

But nice work dude.


I use rr works fine.


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

[Updated on: Wed, 06 May 2009 23:31]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #384720 is a reply to message #383047] Thu, 07 May 2009 00:40 Go to previous messageGo to next message
wittebolx is currently offline  wittebolx
Messages: 332
Registered: May 2007
Location: the netherlands
Karma: 0
Recruit
why im not sure but it has some serious problems with running on mission maps.

Re: [Plug-in] SSGM2.02 Commander BETA [message #384824 is a reply to message #384716] Thu, 07 May 2009 11:07 Go to previous messageGo to next message
ExEric3 is currently offline  ExEric3
Messages: 746
Registered: February 2005
Location: Slovakia
Karma: 0
Colonel
Gen_Blacky wrote on Thu, 07 May 2009 08:13



I use rr works fine.


Try restart FDS or just user quit. Thumbs Up
Re: [Plug-in] SSGM2.02 Commander BETA [message #384827 is a reply to message #384720] Thu, 07 May 2009 11:36 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Gen_Blacky wrote on Thu, 07 May 2009 02:13

if the player was a commander and changed teams it will still say that the player is the commander for that team he was originally on. The commander proxie aura doesn't work in 1.1, worked in 1.0 ,its set on in the .ini. When the agt reports damage it says the damage is like 5984565464


ExEric3 wrote on Tue, 28 April 2009 11:01

It's incompatible with Resurrection. Angry

But nice work dude.


I use rr works fine.


Thankyou, I will look into the proxy aura. Is this value just for the AGT, or does it happen to all buildings?


wittebolx wrote on Thu, 07 May 2009 03:40

why im not sure but it has some serious problems with running on mission maps.



What are these serious problems?



Re: [Plug-in] SSGM2.02 Commander BETA [message #384845 is a reply to message #383214] Thu, 07 May 2009 12:42 Go to previous messageGo to next message
LGdirk is currently offline  LGdirk
Messages: 16
Registered: July 2007
Location: Germany
Karma: 0
Recruit
reborn wrote on Tue, 28 April 2009 13:23

Ah right, thanks.
That's pretty weird then, everyone else had no problems at all with it :-/
Zeiss, if you're around still in 4-5 hours from now catch me on msn fm_reborn@hotmail.com, I will try to resolve the problem.


hmm seems i got the same problem. server restart after using the tc cmd. so i install a new clear server and br 1.52. i add only the commander plug-in so it looks like this:

[Plugins]
01=BRenBot.dll
02=commander.dll

no other things added. what can i say? it crash again.
now the weired part. i test some maps and on non-flying maps, the server crash but on walls flying and city flying the commander plug-in works fine.
Re: [Plug-in] SSGM2.02 Commander BETA [message #384865 is a reply to message #383047] Thu, 07 May 2009 14:10 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Ah, Dirk. Thanks for the info. Would you be so kind as to try making it crash without using brenbot.dll? If I can say for certain that brenbot.dll is causing the problem I am sure I can come to a solution.
Is everybody else that's experiencing crashes on the chat command also using brenbot.dll?



Re: [Plug-in] SSGM2.02 Commander BETA [message #384869 is a reply to message #383047] Thu, 07 May 2009 14:32 Go to previous messageGo to next message
LGdirk is currently offline  LGdirk
Messages: 16
Registered: July 2007
Location: Germany
Karma: 0
Recruit
i test it without brenbot.dll and it crashed

[Plugins]
01=commander.dll

i run my server on win2000 so think that can be the problem but after i check a installation on vista, i know it its not the OS because i got the same error.

so i have no clue what it is.


[Updated on: Thu, 07 May 2009 14:46]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #384930 is a reply to message #383047] Thu, 07 May 2009 21: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 use brenbot 1.52 with whole bunch of plugins for it, i use ssgm and rr and a whole bunch of different plugins one of them is brenbot.dll and it has never crashed my server yet.

Reborn when any building is at half damage its says its like 58567507546 damage. I got the aura proxy to work i just recompiled it and got it working.

I think peoples server might be crashing if they have a modified scripts.dll i always have plugins crash the server if the scripts.dll is modified. Thats why i just add everything to plugins.


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

[Updated on: Thu, 07 May 2009 21:51]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #384939 is a reply to message #384930] Thu, 07 May 2009 22:37 Go to previous messageGo to next message
LGdirk is currently offline  LGdirk
Messages: 16
Registered: July 2007
Location: Germany
Karma: 0
Recruit
Gen_Blacky wrote on Thu, 07 May 2009 23:41

I think peoples server might be crashing if they have a modified scripts.dll i always have plugins crash the server if the scripts.dll is modified. Thats why i just add everything to plugins.


that would be a reason but i change or edit nothing.

the language of the system, can that be the problem? i mean zeiss use german system, a other guy who test it on his system and me, we all use german windows. (on zeiss not sure) maybe there is a dll involved where the language is incompatible with this script. ok call me n00b for this, i have no idea about this but maybe its a reason.
Re: [Plug-in] SSGM2.02 Commander BETA [message #385083 is a reply to message #383047] Fri, 08 May 2009 14:18 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Now that I've got that second vet system out of my hair, I'll update the commander plug-in, release it as a debug version, then take the crash dumps from people to pass on to a friend.
I hope to have an update (that will still likely crash, but at least fix a few other things) soon.
It's hard to debug because I cannot cause this crash myself at all, and no one seems to be able to give steps on reproducing the crash, perhaps it has something to do with the regulators you guys use. But don't worry, it'll get fixed. Wink



[Updated on: Fri, 08 May 2009 14:18]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #385242 is a reply to message #383047] Sat, 09 May 2009 09:51 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 made some Revivable buildings commands using reborns team fund function and commander function. The team all donate to team fund and if a building dies the commander can revive the building if there is enough money in the team fund. I made it ini configurable for the amount it cost for the buildings to be revived.

Requirements
-Renegade Resurrection
-Add to Reborns Commander plugin so it can uses its functions.

Under the SettingsStruct in the .h file

		powerplantcost = 20000;
		vehiclefactoriescost = 20000;
		soldierfactories = 20000;
		refcost = 20000;
		basedefensecost = 20000;



Under void Load(); in the .h file

	int	powerplantcost;
	int	vehiclefactoriescost;
	int	soldierfactories;
	int	refcost;
	int	basedefensecost;



Under the SettingsLoader;


	LoadInt(powerplantcost,"powerplantcost");
	printf("The cost for a Power Plant is %i credits\n",powerplantcost);
	LoadInt(vehiclefactoriescost,"vehiclefactoriescost");
	printf("The cost for a Vehicle Factory is %i credits\n",vehiclefactoriescost);
	LoadInt(soldierfactories,"soldierfactories");
	printf("The cost for a Charcter Factory is %i credits\n",soldierfactories);
	LoadInt(refcost,"refcost");
	printf("The cost for the Refinary is %i credits\n",refcost);
	LoadInt(basedefensecost,"basedefensecost");
	printf("The cost for Basedefences is %i credits\n",basedefensecost);



Add to the .ini file

powerplantcost=20000;

vehiclefactoriescost=20000;

soldierfactories=20000;

refcost=20000;

basedefensecost=20000;



Main Revive Commands


//////////////////////
///Revive Buildings///
//////////////////////

class revive_vehiclefactoriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Vehicle_Factory(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		if(Is_Building_Dead(Find_Vehicle_Factory(Team))) {
			if(GDICommander[ID]){
				if(GDITeamFund >= CSettings->vehiclefactoriescost){
					GDITeamFund = GDITeamFund - CSettings->vehiclefactoriescost;
					Console_Input(StrFormat("msg The GDI Commander just revived the Weapons Factory",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->vehiclefactoriescost).c_str());
				}
			}
			else if(NodCommander[ID]){
				if(NodTeamFund >= CSettings->vehiclefactoriescost){
					NodTeamFund = NodTeamFund - CSettings->vehiclefactoriescost;
					Console_Input(StrFormat("msg The GDI Commander just revived the Airstrip",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->vehiclefactoriescost).c_str());
				}
			}
		}
		else if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The Weapons Factory is not dead.",Get_Player_ID(obj)).c_str());	
		}
		else if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Airstrip is not dead.",Get_Player_ID(obj)).c_str());
		}
		else{
			Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
		}
	}
};
ChatCommandRegistrant<revive_vehiclefactoriesChatCommand> revive_vehiclefactoriesChatCommandReg("!revive_wf;!revive_air;!r wf;!r air",CHATTYPE_TEAM,0,GAMEMODE_ALL);

class revive_refineriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Refinery(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		//if(CSettings->enablerevive){
		if(Is_Building_Dead(Find_Refinery(Team))) {
			if(GDICommander[ID]){
				if(GDITeamFund >= CSettings->refcost){
					GDITeamFund = GDITeamFund - CSettings->refcost;
					Console_Input(StrFormat("msg The GDI Commander just revived the GDI Refinary",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->refcost).c_str());
				}
			}
			else if(NodCommander[ID]){
				if(NodTeamFund >= CSettings->refcost){
					NodTeamFund = NodTeamFund - CSettings->refcost;
					Console_Input(StrFormat("msg The Nod Commander just revived the Nod Refinary",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->refcost).c_str());
				}
			}
		}
		else if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The GDI Refinary is not dead.",Get_Player_ID(obj)).c_str());	
		}
		else if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Nod Refinary is not dead.",Get_Player_ID(obj)).c_str());
		}
		else{
			Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
		}
	}
};
ChatCommandRegistrant<revive_refineriesChatCommand> revive_refineriesChatCommandReg("!revive_ref;!r_ref",CHATTYPE_TEAM,0,GAMEMODE_AOW);


class revive_powerplantsChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Power_Plant(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		if(Is_Building_Dead(Find_Power_Plant(Team))) {
			if(GDICommander[ID]){
				if(GDITeamFund >= CSettings->powerplantcost){
					GDITeamFund = GDITeamFund - CSettings->powerplantcost;
					Console_Input(StrFormat("msg The GDI Commander just revived the GDI PowerPlant",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->powerplantcost).c_str());
				}
			}
			else if(NodCommander[ID]){
				if(NodTeamFund >= CSettings->powerplantcost){
					NodTeamFund = NodTeamFund - CSettings->powerplantcost;
					Console_Input(StrFormat("msg The Nod Commander just revived the Nod Powerplant",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->powerplantcost).c_str());
				}
			}
		}
		else if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The GDI Powerplant is not dead.",Get_Player_ID(obj)).c_str());	
		}
		else if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Nod Powerplant is not dead.",Get_Player_ID(obj)).c_str());
		}
		else{
			Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
		}
	}
};
ChatCommandRegistrant<revive_powerplantsChatCommand> revive_powerplantsChatCommandReg("!revive_pp;!r_pp",CHATTYPE_TEAM,0,GAMEMODE_AOW);


class revive_soldierfactoriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Soldier_Factory(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		if(Is_Building_Dead(Find_Building(Team,SOLDIER_FACTORY))) {
			if(GDICommander[ID]){
				if(GDITeamFund >= CSettings->soldierfactories){
					GDITeamFund = GDITeamFund - CSettings->soldierfactories;
					Console_Input(StrFormat("msg The GDI Commander just revived the GDI Barracks",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->soldierfactories).c_str());
				}
			}
			else if(NodCommander[ID]){
				if(NodTeamFund >= CSettings->soldierfactories){
					NodTeamFund = NodTeamFund - CSettings->soldierfactories;
					Console_Input(StrFormat("msg The Nod Commander just revived the Hand of Nod",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->soldierfactories).c_str());
				}
			}
		}
		else if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The GDI Barracks is not dead.",Get_Player_ID(obj)).c_str());	
		}
		else if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Hand of Nod is not dead.",Get_Player_ID(obj)).c_str());
		}
		else{
			Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
		}
	}
};
ChatCommandRegistrant<revive_soldierfactoriesChatCommand> revive_soldierfactoriesChatCommandReg("!revive_bar;!revive_hon;!r_hon;!r_bar",CHATTYPE_TEAM,0,GAMEMODE_AOW);


class revive_basedefenseChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Base_Defense(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		if(Is_Building_Dead(Find_Building(Team,BASE_DEFENSE))) {
			if(GDICommander[ID]){
				if(GDITeamFund >= CSettings->basedefensecost){
					GDITeamFund = GDITeamFund - CSettings->basedefensecost;
					Console_Input(StrFormat("msg The GDI Commander just revived the GDI Advance Guard Tower",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->basedefensecost).c_str());
				}
			}
			else if(NodCommander[ID]){
				if(NodTeamFund >= CSettings->basedefensecost){
					NodTeamFund = NodTeamFund - GDITeamFund - CSettings->basedefensecost;
					Console_Input(StrFormat("msg The Nod Commander just revived the Nod Obelisk",Get_Player_ID(obj)).c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",Get_Player_ID(obj),CSettings->basedefensecost).c_str());	
				}
			}
		}
		else if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The GDI Advance Guard Tower is not dead.",Get_Player_ID(obj)).c_str());	
		}
		else if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Nod Obelisk is not dead.",Get_Player_ID(obj)).c_str());
		}
		else{
			Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
		}
	}
};
ChatCommandRegistrant<revive_basedefenseChatCommand> revive_basedefenseChatCommandReg("!revive_ob;!revive_agt;!r_agt;!r_ob",CHATTYPE_TEAM,0,GAMEMODE_AOW);




Commands used to kill buildings so its easier to test the revive commands.


/////////////////////
///Kill Buildings////
/////////////////////


class kill_vehiclefactoriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Vehicle_Factory(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		Vector3 position = Commands->Get_Position(thebuilding);
		Commands->Apply_Damage(thebuilding,99999,"Death",false);
		if (Team == 1) {
			Console_Input(StrFormat("msg War Factory Destroyed",Get_Player_ID(obj)).c_str());
		}
		else {
			Console_Input(StrFormat("msg Airstrip Destroyed",Get_Player_ID(obj)).c_str());
		}
	}
};
ChatCommandRegistrant<kill_vehiclefactoriesChatCommand> kill_vehiclefactoriesChatCommandReg("!kill_wf;!kill_air",CHATTYPE_TEAM,0,GAMEMODE_ALL);


class kill_refineriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Refinery(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		Vector3 position = Commands->Get_Position(thebuilding);
		Commands->Apply_Damage(thebuilding,99999,"Death",false);
		if (Team == 1) {
			Console_Input(StrFormat("msg GDI Refinary Destroyed",Get_Player_ID(obj)).c_str());
		}
		else {
			Console_Input(StrFormat("msg Nod Refinary Destroyed",Get_Player_ID(obj)).c_str());
		}
	}
};
ChatCommandRegistrant<kill_refineriesChatCommand> kill_refineriesChatCommandReg("!kill_ref",CHATTYPE_TEAM,0,GAMEMODE_ALL);


class kill_basedefenseChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Base_Defense(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		Vector3 position = Commands->Get_Position(thebuilding);
		Commands->Apply_Damage(thebuilding,99999,"Death",false);
		if (Team == 1) {
			Console_Input(StrFormat("msg GDI AGT Destroyed",Get_Player_ID(obj)).c_str());
		}
		else {
			Console_Input(StrFormat("msg Nod Obelisk Destroyed",Get_Player_ID(obj)).c_str());
		}
	}
};
ChatCommandRegistrant<kill_basedefenseChatCommand> kill_basedefenseChatCommandReg("!kill_agt;!kill_ob",CHATTYPE_TEAM,0,GAMEMODE_ALL);


class kill_powerplantChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Power_Plant(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		Vector3 position = Commands->Get_Position(thebuilding);
		Commands->Apply_Damage(thebuilding,99999,"Death",false);
		if (Team == 1) {
			Console_Input(StrFormat("msg GDI Power Plant Destroyed",Get_Player_ID(obj)).c_str());
		}
		else {
			Console_Input(StrFormat("msg Nod Power Plant Destroyed",Get_Player_ID(obj)).c_str());
		}
	}
};
ChatCommandRegistrant<kill_powerplantChatCommand> kill_powerplantChatCommandReg("!kill_pp;!kill_powerplant",CHATTYPE_TEAM,0,GAMEMODE_ALL);


class kill_soldierfactoriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Soldier_Factory(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		Vector3 position = Commands->Get_Position(thebuilding);
		Commands->Apply_Damage(thebuilding,99999,"Death",false);
		if (Team == 1) {
			Console_Input(StrFormat("msg GDI Barracks Destroyed",Get_Player_ID(obj)).c_str());
		}
		else {
			Console_Input(StrFormat("msg Nod Hand of Nod Destroyed",Get_Player_ID(obj)).c_str());
		}
	}
};
ChatCommandRegistrant<kill_soldierfactoriesChatCommand> kill_soldierfactoriesChatCommandReg("!kill_bar;!kill_hon",CHATTYPE_TEAM,0,GAMEMODE_ALL);




The the only problem I have seen so far is when the building is dead and a player that is not a commander uses the command. It wont tell the player hes not a commander. If the building is alive it will.


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

[Updated on: Sat, 09 May 2009 09:52]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #385252 is a reply to message #383047] Sat, 09 May 2009 10:45 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Hey man, pretty cool that you released this, there are a few little errors, but nice one Wink


[Updated on: Sat, 09 May 2009 10:46]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #385253 is a reply to message #383047] Sat, 09 May 2009 10:47 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
can you show me the errors

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: [Plug-in] SSGM2.02 Commander BETA [message #385262 is a reply to message #385242] Sat, 09 May 2009 11:00 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
This might make things work a bit better for you.
You would need to apply the same sort of changes I made throughout your code. But it looks nice man. Smile

class revive_vehiclefactoriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Vehicle_Factory(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		if(Is_Building_Dead(Find_Vehicle_Factory(Team))) {
			if(GDICommander[ID] || NodCommander[ID]){
			if(GDICommander[ID]){
				if(GDITeamFund >= CSettings->vehiclefactoriescost){
					GDITeamFund = GDITeamFund - CSettings->vehiclefactoriescost;
					Console_Input(StrFormat("msg The GDI Commander just revived the Weapons Factory").c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",ID,CSettings->vehiclefactoriescost).c_str());
				}
			}
			else if(NodCommander[ID]){
				if(NodTeamFund >= CSettings->vehiclefactoriescost){
					NodTeamFund = NodTeamFund - CSettings->vehiclefactoriescost;
					Console_Input(StrFormat("msg The GDI Commander just revived the Airstrip").c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",ID,CSettings->vehiclefactoriescost).c_str());
				}
			}
		}
					else {
			Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
		}
		}
		else{
			if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The Weapons Factory is not dead.",ID).c_str());
			}
		}
		else{
			if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Airstrip is not dead.",ID).c_str());
			}
		}
	}
};
ChatCommandRegistrant<revive_vehiclefactoriesChatCommand> revive_vehiclefactoriesChatCommandReg("!revive_wf;!revive_air;!r wf;!r air",CHATTYPE_TEAM,0,GAMEMODE_ALL);



Re: [Plug-in] SSGM2.02 Commander BETA [message #385297 is a reply to message #383047] Sat, 09 May 2009 14:24 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)


illegal else without matching if

		else if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The GDI Powerplant is not dead.",Get_Player_ID(obj)).c_str());	
		}
		else if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Nod Powerplant is not dead.",Get_Player_ID(obj)).c_str());
		}


http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: [Plug-in] SSGM2.02 Commander BETA [message #385301 is a reply to message #385297] Sat, 09 May 2009 15:26 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Gen_Blacky wrote on Sat, 09 May 2009 17:24



illegal else without matching if

		else if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The GDI Powerplant is not dead.",Get_Player_ID(obj)).c_str());	
		}
		else if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Nod Powerplant is not dead.",Get_Player_ID(obj)).c_str());
		}




I'm guessing that's part of the power plant revive command. You will need to post that whole command for me to fix it for you.
Also, you don't need to get the GameObject of the player.



Re: [Plug-in] SSGM2.02 Commander BETA [message #385314 is a reply to message #385262] Sat, 09 May 2009 19:17 Go to previous messageGo to previous message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
reborn wrote on Sat, 09 May 2009 13:00

This might make things work a bit better for you.
You would need to apply the same sort of changes I made throughout your code. But it looks nice man. Smile

class revive_vehiclefactoriesChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		int Team = Get_Object_Type(obj);
		int BuildingID = Commands->Get_ID(Find_Vehicle_Factory(Team));
		GameObject *thebuilding = Commands->Find_Object(BuildingID);
		if(Is_Building_Dead(Find_Vehicle_Factory(Team))) {
			if(GDICommander[ID] || NodCommander[ID]){
			if(GDICommander[ID]){
				if(GDITeamFund >= CSettings->vehiclefactoriescost){
					GDITeamFund = GDITeamFund - CSettings->vehiclefactoriescost;
					Console_Input(StrFormat("msg The GDI Commander just revived the Weapons Factory").c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",ID,CSettings->vehiclefactoriescost).c_str());
				}
			}
			else if(NodCommander[ID]){
				if(NodTeamFund >= CSettings->vehiclefactoriescost){
					NodTeamFund = NodTeamFund - CSettings->vehiclefactoriescost;
					Console_Input(StrFormat("msg The GDI Commander just revived the Airstrip").c_str());
					Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
					Commands->Create_2D_WAV_Sound("pplant_powerup.wav");
				}
				else{
				Console_Input(StrFormat("ppage %d There is not enough credits in the team fund you need $%i. Use !tfdonate to add to the fund.",ID,CSettings->vehiclefactoriescost).c_str());
				}
			}
		}
					else {
			Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
		}
		}
		else{
			if(GDICommander[ID]){
			Console_Input(StrFormat("ppage %d The Weapons Factory is not dead.",ID).c_str());
			}
		}
		else{
			if(NodCommander[ID]){
			Console_Input(StrFormat("ppage %d The Airstrip is not dead.",ID).c_str());
			}
		}
	}
};
ChatCommandRegistrant<revive_vehiclefactoriesChatCommand> revive_vehiclefactoriesChatCommandReg("!revive_wf;!revive_air;!r wf;!r air",CHATTYPE_TEAM,0,GAMEMODE_ALL);




your code gave that error i was showing u where the error was.

Edit:

Just noticed i sent u the wrong code lol


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

[Updated on: Sat, 09 May 2009 19:18]

Report message to a moderator

Previous Topic: Hot Snow [3rd Havoc Mode]
Next Topic: [SKIN] C&C 3 Medium Tank
Goto Forum:
  


Current Time: Fri Nov 22 19:38:55 MST 2024

Total time taken to generate the page: 0.02312 seconds