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 #385262 is a reply to message #385242] Sat, 09 May 2009 11:00 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
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);



 
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: Fri Nov 22 22:40:07 MST 2024

Total time taken to generate the page: 0.01976 seconds