Raised This Month: $ Target: $400
 0% 

Disable an entire plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 08-07-2012 , 18:24   Disable an entire plugin
Reply With Quote #1

I would like to make a cvar g_cvarEnable for example that i can disable the entire plugin with it (or enable). Any help please?

Tried to look inside GunGame and CSDM but found that's is too complicated.
__________________
n0br41ner is offline
Old 08-08-2012, 11:05
n0br41ner
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 08-23-2012 , 19:04   Re: Disable an entire plugin
Reply With Quote #2

bump!
__________________
n0br41ner is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 08-23-2012 , 19:36   Re: Disable an entire plugin
Reply With Quote #3

You could check the cvar on every round and save it to a bool then in each function of your plugin return PLUGIN_HANDLED if it's turned off
Erox902 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-23-2012 , 19:57   Re: Disable an entire plugin
Reply With Quote #4

Quote:
Originally Posted by n0br41ner View Post
I would like to make a cvar g_cvarEnable for example that i can disable the entire plugin with it (or enable). Any help please?

Tried to look inside GunGame and CSDM but found that's is too complicated.
It's actually extremely easy conceptually. Just check the cvar before anything happens.

Quote:
Originally Posted by Erox902 View Post
You could check the cvar on every round and save it to a bool then in each function of your plugin return PLUGIN_HANDLED if it's turned off
This is a very poor "blanket" answer and would not be a good idea to implement (the "check in every function" part, not the cache it on new round)
__________________
fysiks is offline
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 08-23-2012 , 22:11   Re: Disable an entire plugin
Reply With Quote #5

Thank you. Got the concept.
__________________
n0br41ner is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode