Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Plugin : Programmically enabling or disabling commands
Plugin : Programmically enabling or disabling commands [message #376573] Tue, 17 March 2009 13:15 Go to next message
Zuess is currently offline  Zuess
Messages: 16
Registered: August 2004
Karma: 0
Recruit
I want to be able to enable or disable chat commands that are created by ChatCommandRegistrant.


The way I was thinking about it is this way
class PluginCommands : public ChatCommandClass 
{
	void Triggered(int ID,const TokenClass &Text,int ChatType) 
	{
           if(!commandenabled{return;}  /// here is what I added

        }
}



The problem is, the command will still be loaded, which wastes memory.
It might just be me being anal because I have been programming limited memory in microcontrollers, and may not make a difference.
But is there a way to keep the complete class from loading.

[Updated on: Tue, 17 March 2009 13:16]

Report message to a moderator

Re: Plugin : Programmically enabling or disabling commands [message #376575 is a reply to message #376573] Tue, 17 March 2009 13:32 Go to previous messageGo to next message
Sir Kane
Messages: 1701
Registered: March 2003
Location: Angerville
Karma: 0
General (1 Star)
No, there is not.

Proud N9500 and proud N6270 user. Creator of the IEE libraries (original bhs.dll) and the RB series software.
http://n00bstories.com/image.fetch.php?id=1189992501http://www.n00bstories.com/image.fetch.php?id=1257492907
Re: Plugin : Programmically enabling or disabling commands [message #376577 is a reply to message #376573] Tue, 17 March 2009 13:59 Go to previous messageGo to next message
Zuess is currently offline  Zuess
Messages: 16
Registered: August 2004
Karma: 0
Recruit
kk thank you.
Re: Plugin : Programmically enabling or disabling commands [message #376578 is a reply to message #376573] Tue, 17 March 2009 14:03 Go to previous message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma: 0
General (3 Stars)
Permabanned for trying and failing DDoS
You can enabling/disabling Commands by another way using selfmade Scripts and Customs
Previous Topic: gdflor-gdi
Next Topic: vehicle shells
Goto Forum:
  


Current Time: Thu Jul 11 07:45:17 MST 2024

Total time taken to generate the page: 0.00865 seconds