Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » 4.0 doesn't support some stuff that 3.4 did??
4.0 doesn't support some stuff that 3.4 did?? [message #468141] Tue, 29 May 2012 01:51 Go to previous message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma:
Colonel

ChatCommandClass
ChatCommandRegistrant
TokenClass


It doesn't let me use them.

Here's the code I did.

class picChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {

	    GameObject *obj = Get_GameObj(ID);
		int cost = 1200;
		const char *item = "Pic";
		const char *powerup = "POW_PersonalIonCannon_Player";
//		const char *wepname = "Weapon_PersonalIonCannon_Player";


		if (Commands->Get_Money(Get_GameObj(ID)) < cost)
		{
			Console_Input(StrFormat("sndp %d m00evag_dsgn0028i1evag_snd.wav",ID).c_str());
			Console_Input(StrFormat("ppage %d you need %d to buy a %s",ID, cost, item).c_str());
		}
		else
		{
            Commands->Give_PowerUp(obj, powerup, 1);
//            Set_Clip_Bullets(obj,wepname,Get_Max_Clip_Bullets(obj,wepname));
            Commands->Give_Money(obj, static_cast<float>(-cost), false);
            Console_Input(StrFormat("msg %s just bought a %s ",Get_Player_Name(obj), item, cost).c_str());
			
		}
	}
};

ChatCommandRegistrant<picChatCommand> picChatCommandReg("!personal_ion_cannon;!pic",CHATTYPE_ALL,0,GAMEMODE_ALL);


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Tue, 29 May 2012 01:55]

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
Previous Topic: Need help please
Next Topic: page poke system
Goto Forum:
  


Current Time: Thu Aug 22 07:58:50 MST 2024

Total time taken to generate the page: 0.00725 seconds