Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » How to add an OBGun in SSGM
Re: How to add an OBGun in SSGM [message #322325 is a reply to message #322247] Sat, 15 March 2008 06:24 Go to previous message
wittebolx is currently offline  wittebolx
Messages: 332
Registered: May 2007
Location: the netherlands
Karma:
Recruit
this works only if your PP is online and when you have modded the preset ''POW_Double_Damage'' in objects.gm

class ddamageChatCommand : public ChatCommandClass {
   void Triggered(int ID,const TokenClass &Text,int ChatType) {
      GameObject *obj = Get_GameObj(ID);
float Credits = Commands->Get_Money(obj);
Vector3 position;
position = Commands->Get_Position(obj);
if(!Is_Building_Dead(Find_Power_Plant(Get_Team(ID))))
{
if(Credits >= 5000){
   Commands->Give_Money(obj,-5000,false);
char message[256];
sprintf(message,"msg [WGC]: %s just Upgraded his Weapons Arsenal with a Obelisk Gun", Get_Player_Name_By_ID(ID));
Console_Input(message);      
Commands->Give_Powerup(obj,"POW_Double_Damage",false);
Commands->Set_Position(obj,position);
   }
else{
Console_Input(StrFormat("ppage %d You need $5000, Your Power Plant needs to be Online!.",Get_Player_ID(obj)).c_str());      
}
}
   }
};
ChatCommandRegistrant<ddamageChatCommand> ddamageChatCommandReg("!obby",CHATTYPE_TEAM,0,GAMEMODE_AOW);


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [script]Code Release - Kamikaze Suit Crate
Next Topic: Calling all Star Wars fans.
Goto Forum:
  


Current Time: Mon Oct 14 07:42:37 MST 2024

Total time taken to generate the page: 0.01135 seconds