[ SOLVED ] Make .ini or .cfg file to plugin?
How to make basic .ini or .cfg to configure the weapons?
This is the code: Code:
|
Re: [ HELP ] Make .ini or .cfg file to plugin?
Simply learn how to read a file and then use that strings that you get from the file to insert into the bot_weapons array.
|
Re: [ HELP ] Make .ini or .cfg file to plugin?
Tutorials about it?
|
Re: [ HELP ] Make .ini or .cfg file to plugin?
About what? Have you tried searching? Also, one simple example of reading a file can be found in my "Bot Apology for TK" in my signature.
|
Re: [ HELP ] Make .ini or .cfg file to plugin?
Tutorials about how to make config file :lol:
I will take a look. |
Re: [ HELP ] Make .ini or .cfg file to plugin?
Is the goal of this to replace what the bot_weapons[] array holds? Is this just a list of weapon names that will be used?
|
Re: [ HELP ] Make .ini or .cfg file to plugin?
Yes.
|
Re: [ HELP ] Make .ini or .cfg file to plugin?
If you want a tutorial, search for it. You don't really need a tutorial because the code I told you to look at does everything that you need already. You just need to convert it for your purpose.
P.S. A "config" file is just a text file. P.P.S. The file that you are describing wouldn't really be a cfg file, IMO. In the context of HLDS, a .cfg file contains commands/cvars and can be executed fully standalone with the exec command. P.P.P.S Note that this was early in my plugin scripting experience so you would want to update this: Code:
new g_sorry_phrases[SORRYS_MAX][SORRYS_LEN+1] Code:
new g_sorry_phrases[10][65] |
Re: [ HELP ] Make .ini or .cfg file to plugin?
File needs to be in below format (supports exclusion by using ';' or '//'):
Code:
weapon_ak47 PHP Code:
|
Re: [ HELP ] Make .ini or .cfg file to plugin?
And how is he supposed to learn anything if you do it all for him?
|
All times are GMT -4. The time now is 17:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.