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 |
|
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.
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 #384051 is a reply to message #383047] |
Sun, 03 May 2009 01:32 |
|
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
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 |
|
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 |
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 |
|
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.
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 |
|
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.
But nice work dude.
|
I use rr works fine.
[Updated on: Wed, 06 May 2009 23:31] Report message to a moderator
|
|
|
|
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #384865 is a reply to message #383047] |
Thu, 07 May 2009 14:10 |
|
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 |
|
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 |
|
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.
[Updated on: Thu, 07 May 2009 21:51] Report message to a moderator
|
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #385083 is a reply to message #383047] |
Fri, 08 May 2009 14:18 |
|
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.
[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 |
|
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.
[Updated on: Sat, 09 May 2009 09:52] Report message to a moderator
|
|
|
|
|
Re: [Plug-in] SSGM2.02 Commander BETA [message #385262 is a reply to message #385242] |
Sat, 09 May 2009 11:00 |
|
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.
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 #385301 is a reply to message #385297] |
Sat, 09 May 2009 15:26 |
|
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 |
|
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.
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
[Updated on: Sat, 09 May 2009 19:18] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Oct 31 04:00:59 MST 2024
Total time taken to generate the page: 0.01337 seconds
|