Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » c++ simple commands
Re: c++ simple commands [message #335471 is a reply to message #335205] Sun, 15 June 2008 16:28 Go to previous messageGo to previous message
wittebolx is currently offline  wittebolx
Messages: 332
Registered: May 2007
Location: the netherlands
Karma:
Recruit
class roshamboChatCommand : public ChatCommandClass {
   void Triggered(int ID,const TokenClass &Text,int ChatType) {
      GameObject *obj = Get_GameObj(ID);
float Credits = Commands->Get_Money(obj);
int Team = Get_Object_Type(obj);
Vector3 position;
position = Commands->Get_Position(obj);
if(!Is_Building_Dead(Find_Soldier_Factory(0)))
{
if(Credits >= 7000 && (Team == 0) ){
   Commands->Give_Money(obj,-7000,false);
char message[256];
sprintf(message,"msg [WGC]: %s just transformed into a Roshambo", Get_Player_Name_By_ID(ID));
Console_Input(message);      
Change_Character(obj,"Mutant_3Boss_Raveshaw");
Commands->Give_Powerup(obj,"POW_Shotgun_Player",false);
Commands->Give_Powerup(obj,"POW_Pistol_Player",false);
Commands->Give_Powerup(obj,"POW_AutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_Flamethrower_Player",false);
Commands->Give_Powerup(obj,"POW_GrenadeLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_RepairGun_Player",false);
Commands->Give_Powerup(obj,"POW_Chaingun_Player",false);
Commands->Give_Powerup(obj,"POW_RocketLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_ChemSprayer_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumAutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_SniperRifle_Player",false);
Commands->Give_Powerup(obj,"POW_LaserChaingun_Player",false);
Commands->Give_Powerup(obj,"POW_LaserRifle_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumFlechetteGun_Player",false);
Commands->Give_Powerup(obj,"POW_PersonalIonCannon_Player",false);
Commands->Give_Powerup(obj,"POW_Railgun_Player",false);
Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false);
Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_Nuclear_Missle_Beacon",false);
Commands->Set_Position(obj,position);
   }
else{
Console_Input(StrFormat("ppage %d This command works only for Nod, You need $7000, The Hand of Nod needs to be Online!.",Get_Player_ID(obj)).c_str());      
}
}
   }
};
ChatCommandRegistrant<roshamboChatCommand> roshamboChatCommandReg("!roshambo",CHATTYPE_TEAM,0,GAMEMODE_AOW);


if you need an Uber Character Wink
1. Nod only.
2. Hand of Nod Required.
3. 7000 credits


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Renegade Resurrection 1.1 is out!
Next Topic: Veteran Plugin.
Goto Forum:
  


Current Time: Mon Dec 23 20:36:29 MST 2024

Total time taken to generate the page: 0.00800 seconds