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 #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:
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

 
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 11:02:02 MST 2024

Total time taken to generate the page: 0.02165 seconds