AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Call function or set cvar? (https://forums.alliedmods.net/showthread.php?t=47581)

rory535 11-21-2006 11:42

Call function or set cvar?
 
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

schnitzelmaker 11-21-2006 12:04

Re: Call function or set cvar?
 
It can both use,but a cvar is better and easier to code.

The Specialist 11-21-2006 23:11

Re: Call function or set cvar?
 
Code:
set_cvar_string("whatever","1")


All times are GMT -4. The time now is 06:59.

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