Raised This Month: $7 Target: $400
 1% 

[INC] Append new ConVars to plugin config v2.1


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 04-06-2017 , 23:46   Re: [INC] Append new ConVars to plugin config
Reply With Quote #11

Quote:
Originally Posted by KissLick View Post
I plan to make a better and smarter version after my exams, this is a little messy version.. O:-)
I think I'll spend some time in converting this to newer syntax as this can be pretty useful.
Mitchell is offline
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 04-08-2017 , 16:41   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #12

Quote:
Originally Posted by KissLick View Post
Ciao,
I read that now, why did you greeted in italian, just curiosity
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!
Papero is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 04-09-2017 , 07:08   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #13

Quote:
Originally Posted by Papero View Post
I read that now, why did you greeted in italian, just curiosity
I just like the sound of it :-)
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
T1MOXA
Member
Join Date: Aug 2016
Old 07-07-2017 , 21:32   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #14

Does not work, unfortunately.
Created an empty file.

// Append new ConVars for plugin test.smx
// @version:
T1MOXA is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 07-08-2017 , 00:06   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #15

Quote:
Originally Posted by T1MOXA View Post
Does not work, unfortunately.
Created an empty file.

// Append new ConVars for plugin test.smx
// @version:
You're doing something wrong. Post your code.
__________________
ddhoward is offline
T1MOXA
Member
Join Date: Aug 2016
Old 07-08-2017 , 02:51   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #16

For example -
Code:
ConVar cvar1, cvar3, cvar4;

public OnPluginStart()
{
    cvar1 = CreateConVar( "sm_cvar1",    "1",         "ConVar description for cvar 1..." );
    cvar3 = CreateConVar( "sm_cvar3",     "3.5",     "ConVar description for cvar 3..." );
    cvar4 = CreateConVar( "sm_cvar4",     "Ciao",     "ConVar description for cvar 4..." );
    
    AutoExecConfigAppend("ConfigName");
}
T1MOXA is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-08-2017 , 10:50   Re: [INC] Append new ConVars to plugin config
Reply With Quote #17

Quote:
Originally Posted by berni View Post
Couldn't you just load the configuration file, delete it and then let AutoExecConfig create it again ?
This way it should add all Cvars automatically and would be just a few lines of code.
Quote:
Originally Posted by Black-Rabbit View Post
the point of a configuration file is to save the configuration, not to delete it...

Shameless plug because no one seems to notice this plugin and I think its better than other solutions. It creates a new config and updates with your previously customised values. Works on all plugins without needing to edit them. [ANY] Cvar Configs Updater
__________________
Silvers is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 07-08-2017 , 15:42   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #18

Quote:
Originally Posted by T1MOXA View Post
For example -
Code:
ConVar cvar1, cvar3, cvar4;

public OnPluginStart()
{
    cvar1 = CreateConVar( "sm_cvar1",    "1",         "ConVar description for cvar 1..." );
    cvar3 = CreateConVar( "sm_cvar3",     "3.5",     "ConVar description for cvar 3..." );
    cvar4 = CreateConVar( "sm_cvar4",     "Ciao",     "ConVar description for cvar 4..." );
    
    AutoExecConfigAppend("ConfigName");
}
Post YOUR code.
__________________
ddhoward is offline
T1MOXA
Member
Join Date: Aug 2016
Old 07-09-2017 , 05:23   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #19

For what ?
I gave an example.
From plugin that I wrote I removed this include and completely rewrote the code.
So the sense in this.
T1MOXA is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 07-10-2017 , 15:08   Re: [INC] Append new ConVars to plugin config v2.1
Reply With Quote #20

Quote:
Originally Posted by T1MOXA View Post
For what ?
I gave an example.
From plugin that I wrote I removed this include and completely rewrote the code.
So the sense in this.
I guess it was because you didn't include the myinfo structure with plugin version...
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick 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 01:32.


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