Home » Renegade Discussions » Mod Forum » Buy back building mod
Re: Buy back building mod [message #340160 is a reply to message #340027] |
Thu, 10 July 2008 14:26 |
MacKinsey
Messages: 83 Registered: March 2008
Karma:
|
Recruit |
|
|
SSnipe wrote on Wed, 09 July 2008 20:59 | as said pm the forums of xpz
Quote: |
As I find some of my old stuff I will post it. I will let Xphaze keep the newest stuff unless they wish to release it.
I will be editing this post as I upload so check back every now and then.
Link: http://rapidshare.com/files/113797600/Revivable_Buildings.zip
CODE
Revivable Buildings:
Requirements: SSGM and Renegade Resurrection
Install: Put Revive.dll in your FDS folder and add Revive to you plugins list in SSGM.ini
Usage: !revive <Building>
Where <Building> is a short version ie Bar for Barracks.
Known Bugs: This version seems to have a problem with the Veteran plugin release by Hex. I have not fixed this and remains a bug.
|
|
Ehhm this archive code in the archive is only for the hon and for the bar.
And u must only type !revinf
If u dont belive me, here is the code
Toggle Spoiler
class revinfChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
Console_Input(StrFormat("msg 1",Get_Player_ID(obj)).c_str());
float Credits = Commands->Get_Money(obj);
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 (Team == 1) {
if(Credits >= 20000){
Commands->Give_Money(obj,-20000,false);
Console_Input(StrFormat("msg %d Has just revived the Barracks",Get_Player_ID(obj)).c_str());
Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
}
else{
Console_Input(StrFormat("ppage %d You do not have enough credits to revive the Barracks.",Get_Player_ID(obj)).c_str());
}
}
else {
if(Credits >= 20000){
Commands->Give_Money(obj,-20000,false);
Console_Input(StrFormat("msg %d Has just revived the Hand of Nod",Get_Player_ID(obj)).c_str());
Commands->Attach_Script(thebuilding, "RR_ReviveBuilding", "");
}
else{
Console_Input(StrFormat("ppage %d You do not have enough credits to revive the Hand of Nod.",Get_Player_ID(obj)).c_str());
}
}
}
if (Team == 1) {
Console_Input(StrFormat("ppage %d The Barracks is not dead.",Get_Player_ID(obj)).c_str());
}
else {
Console_Input(StrFormat("ppage %d The Hand of Nod is not dead.",Get_Player_ID(obj)).c_str());
}
}
};
ChatCommandRegistrant<revinfChatCommand> revinfChatCommandReg("!revinf",CHATTYPE_TEAM,0,GAMEMODE_AOW);
If sum1 want to do that with tokens, i would be happy, if no one does or it is undoable ill create for every sort of building a command
|
|
|
Goto Forum:
Current Time: Wed Nov 13 19:16:55 MST 2024
Total time taken to generate the page: 0.00821 seconds
|