Raised This Month: $9 Target: $400
 2% 

[INCLUDE] AutoExecConfig: Read and append to auto configs


Post New Thread Reply   
 
Thread Tools Display Modes
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 04-13-2018 , 06:47   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #51

Is it possible to use multiple AutoExecConfig_SetFile() to create multiple autoconfig files?

I'm asking because AutoExecConfig() doesn't allow multiple callbacks if autocreate is set to true for all the callbacks.

Example:

AutoExecConfig(true, "blah");
AutoExecConfig(true, "blarg");

Would only create blah.cfg but not blarg.cfg

Just wanna know if your include is also limited by that.
__________________
AFK like JFK
--
Donate to Motivate
--
Get latest L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM

Last edited by Psyk0tik; 04-13-2018 at 06:49.
Psyk0tik is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 04-13-2018 , 07:10   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #52

Yes that's possible. I'm not sure what you mean with callbacks.
__________________
AutoExecConfig | CallAdmin | More plugins
Join the AlliedModders discord server
You can add me on steam or discord (Impact#9229) if you need help with one of my plugins. Pm me before doing so

Last edited by Impact123; 04-13-2018 at 07:47.
Impact123 is offline
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 04-13-2018 , 07:39   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #53

Quote:
Originally Posted by Impact123 View Post
Yes, that's possible. I'm not sure what you mean with callbacks.
Oh, my bad. I meant just calling AutoExecConfig() multiple times, not callbacks.

Thanks btw!
__________________
AFK like JFK
--
Donate to Motivate
--
Get latest L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM

Last edited by Psyk0tik; 04-13-2018 at 07:39.
Psyk0tik is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 04-13-2018 , 07:48   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #54

Here's an example which would create 2 config files
PHP Code:
AutoExecConfig_SetCreateFile(true);

AutoExecConfig_SetFile("test1");
AutoExecConfig_CreateConVar("test1""1""Test1");
AutoExecConfig_ExecuteFile();

AutoExecConfig_SetFile("test2");
AutoExecConfig_CreateConVar("test2""1""Test2");
AutoExecConfig_ExecuteFile(); 
The important part which i forgot to mention is using

PHP Code:
AutoExecConfig_SetCreateFile(true); 
__________________
AutoExecConfig | CallAdmin | More plugins
Join the AlliedModders discord server
You can add me on steam or discord (Impact#9229) if you need help with one of my plugins. Pm me before doing so
Impact123 is offline
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 04-13-2018 , 18:18   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #55

Would this work as well?

PHP Code:
AutoExecConfig_SetCreateFile(true);
AutoExecConfig_SetFile("test1");
AutoExecConfig_SetFile("test2");
AutoExecConfig_CreateConVar("sm_test1""1""test1");
AutoExecConfig_CreateConVar("sm_test2""2""test2");
AutoExecConfig_ExecuteFile(); 
__________________
AFK like JFK
--
Donate to Motivate
--
Get latest L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM

Last edited by Psyk0tik; 04-13-2018 at 18:51.
Psyk0tik is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 04-14-2018 , 00:02   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #56

No. If you use
PHP Code:
AutoExecConfig_SetFile 
you're just setting a few global variables that will be used by the other functions to read, create, append, etc. If you use it like that you would immediately overwrite test1 with test2.
__________________
AutoExecConfig | CallAdmin | More plugins
Join the AlliedModders discord server
You can add me on steam or discord (Impact#9229) if you need help with one of my plugins. Pm me before doing so

Last edited by Impact123; 04-14-2018 at 00:06.
Impact123 is offline
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 04-14-2018 , 00:34   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #57

Quote:
Originally Posted by Impact123 View Post
No. If you use
PHP Code:
AutoExecConfig_SetFile 
you're just setting a few global variables that will be used by the other functions to read, create, append, etc. If you use it like that you would immediately overwrite test1 with test2.
Alright, that makes sense. Thanks!
__________________
AFK like JFK
--
Donate to Motivate
--
Get latest L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM
Psyk0tik is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 12-18-2018 , 16:53   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #58

Where's the file?
__________________
I am looking for devs to help maintain some projects I have

Discord: Eyal282#1334
If you like my work, feel free to donate in appreciation with PayPal or CSGO Skins.

Total Donated: 15$
eyal282 is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 12-18-2018 , 17:54   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #59

That depends on what you pass to AutoExecConfig_SetFile. By default it's created inside the cfg/sourcemod folder.
__________________
AutoExecConfig | CallAdmin | More plugins
Join the AlliedModders discord server
You can add me on steam or discord (Impact#9229) if you need help with one of my plugins. Pm me before doing so

Last edited by Impact123; 12-18-2018 at 17:56.
Impact123 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 12-20-2018 , 12:59   Re: [INCLUDE] AutoExecConfig: Read and append to auto configs
Reply With Quote #60

Quick question, if you give us coders the ability to add cvars into a queue and after adding all cvars, force the queue to execute, won't it be more efficient, as it is required to check the file less?

Edit: Can you also perhaps add a default auto exec global config file that auto sorts itself? I don't like the way AutoExecConfig separates cvars with whole different files, messy and in Linux once caused me crashes.
__________________
I am looking for devs to help maintain some projects I have

Discord: Eyal282#1334
If you like my work, feel free to donate in appreciation with PayPal or CSGO Skins.

Total Donated: 15$

Last edited by eyal282; 12-20-2018 at 13:05.
eyal282 is offline
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 11:43.


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