How to achieve the same result without cvar
Hey there everyone.
So, I don't want to use cvars in my plugins. Thats why I want to know how to achieve the same result without using cvar. I did some with normal variables, but I am not able to do proper expression which checking the switch cvars ( 0 and 1 eg. amx_on ). So can you guys help me out. I have a variable amx_glow set to 1. Now, I want to make a check in a function. Can you tell me how to do the proper check with a small example code ? Thanks. |
Re: How to achieve the same result without cvar
Use cvars. If you are planning to post/release your plugin here then this is mandatory. Hardcoding every configuration in the source file is bad practice and makes it so much harder for the regular user to tweak the setting to his liking.
|
Re: How to achieve the same result without cvar
I completely agree with Hamlet. Use the advantage of configurations to the disadvantage of cvars, which if you didn't know is, having multiple unlimited settings per something.
|
Re: How to achieve the same result without cvar
The plugin is for my own use. And my liking about cvar is just a personal preference.
Then also, even if it becomes hard-coded. I want to know how to do it, cause I want to learn from it. So, can anyone tell me how to ? |
Re: How to achieve the same result without cvar
PHP Code:
|
Re: How to achieve the same result without cvar
Hey @HamletEagle
I tried the way you said with this piece of code -- PHP Code:
The glow is still there even after setting NEMESIS_GLOW and ASSASSIN_GLOW to 0. How to fix it ? |
Re: How to achieve the same result without cvar
Thanks Hamlet btw.
Got it fixed. Actually I was using one '=' instead of '==' |
| All times are GMT -4. The time now is 16:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.