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 #385415 is a reply to message #383047] Sun, 10 May 2009 11:23 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
It's probably just some extra bracket somewhere. I didn't have access to the IDE when I typed it, nor do I now. This might work for you, but I cannot be sure, I'm at work...

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] || 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);


If it doesn't work, then give it a try man, you've got nothing to lose.



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


Current Time: Tue Nov 26 10:11:23 MST 2024

Total time taken to generate the page: 0.01907 seconds