Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » could anyone help me with this mod commands
Re: could anyone help me with this mod commands [message #336142 is a reply to message #336131] Fri, 20 June 2008 07:02 Go to previous messageGo to previous message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma:
General (2 Stars)

Try like this. You had the give powerup command before it did
the money check so you would get the powerup even if you didnt have enough money.

class RailChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) 
	{
	GameObject *obj = Get_GameObj(ID);
	char message[256];
	float Credits = Commands->Get_Money(obj);
		if(Credits >= 600 )
		{
			Commands->Give_Money(obj,-600,false);
			Console_Input(StrFormat("cmsg 166,149,56 [BZ-BOT]: Someone Bought A Railgun",ID).c_str());
			Console_Input(message); 
			Commands->Give_Powerup(obj,"POW_Railgun_Player",false);
		}
		else
		{
			Console_Input(StrFormat("ppage %d Rail Cost 600 ",Get_Player_ID(obj)).c_str()); 
		} 
	}
};
ChatCommandRegistrant<RailChatCommand> RailChatCommandReg("!rail",CHATTYPE_ALL,0,GAMEMODE_AOW);


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png

[Updated on: Fri, 20 June 2008 07:03]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: anyone know were i can get vetran plugin for level promotes on my server
Next Topic: Having problems with C++
Goto Forum:
  


Current Time: Wed Feb 19 18:11:45 MST 2025

Total time taken to generate the page: 0.01028 seconds