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 previous message
Zuess is currently offline  Zuess
Messages: 16
Registered: August 2004
Karma:
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

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: gdflor-gdi
Next Topic: vehicle shells
Goto Forum:
  


Current Time: Mon Dec 23 00:32:57 MST 2024

Total time taken to generate the page: 0.00922 seconds