Plguin Cvar From Cfg
Hi!
How do i make a plugin take the cvars thats needed from a cfg file? Ex. If you have a xp mod with a guy thats get 25 hp each lvl. you only need to open the .cfg file in wordpad(ore other txt program) and change the cvar to whatever you whant :):mrgreen::):mrgreen: |
Re: Plguin Cvar From Cfg
Please explain better, I don't understand what you mean.
|
Re: Plguin Cvar From Cfg
Ex. Warcraft 3 mod uses a Config file thats putt in amxmodx --> config
i whanna know how to make that. becuse i'm working on a plguin where i whant the one tat uses the plugin can change the settings it uses from a config file |
Re: Plguin Cvar From Cfg
ConfigFile[128]
get_configsdir(ConfigFile,127) add(ConfigFile,127,"/yourInIFile.ini") is that like what your looking for? Put that in plugin_init() execute it.. |
Re: Plguin Cvar From Cfg
please say exactly what to writh:D
What modules are needed?? Thanks For the help +KARMA |
Re: Plguin Cvar From Cfg
Please stop posting in all bold.
No modules are needed to read a file. A very easy method is to register the cvar's in your plugin_init(), then somewhere in your code, where you want the cvar's to be read from a .cfg file, do: server_cmd("exec %s", configfile) or whatever. This avoids having to go through the mess of formatting extra stuff just to read a few cvars. |
Re: Plguin Cvar From Cfg
M249 Whats Wrong dude??!?!
i'm not a good scripter as you! i'm stile newbie |
Re: Plguin Cvar From Cfg
haha sorry, something like this:
PHP Code:
|
Re: Plguin Cvar From Cfg
THANKS ALOT!!!
i would never guess that would be the code... + EXTREAM KARMA! :D |
Re: Plguin Cvar From Cfg
Whats The Mycvar cmd?
|
| All times are GMT -4. The time now is 16:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.