Raised This Month: $ Target: $400
 0% 

Call function or set cvar?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rory535
Member
Join Date: Aug 2005
Old 11-21-2006 , 11:42   Call function or set cvar?
Reply With Quote #1

Need some advice. I want to code my first plugin where an admin can type a command that will bring up a menu, that will turn a couple of existing plugins on or off.
For example, the menu comes up saying:
1. Turn On DeathMatch
2. Turn On PluginA

So if the admin wants to turn on PluginA, it automatically turns OFF the DeathMatch plugin.
So heres my question, do I code it to call the function that actually disables DM, or do I just set the cvar or execute the command that disables DM. (A user can type csdm_disable, to disable DM)

Im trying to make it easy for admins, so theyre not busy typing in many commands to turn on and off plugins to get 1 activated.
Thanks
rory535 is offline
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-21-2006 , 12:04   Re: Call function or set cvar?
Reply With Quote #2

It can both use,but a cvar is better and easier to code.
__________________
schnitzelmaker is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-21-2006 , 23:11   Re: Call function or set cvar?
Reply With Quote #3

Code:
set_cvar_string("whatever","1")
The Specialist is offline
Send a message via AIM to The Specialist
Reply


Thread Tools
Display Modes

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 06:59.


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