Raised This Month: $12 Target: $400
 3% 

Config Load


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dangerlord63
Senior Member
Join Date: Aug 2011
Old 04-28-2018 , 04:36   Config Load
Reply With Quote #1

i have a plugin like this;

PHP Code:
#include <sourcemod>

ConVar kredi;
ConVar tagi;

public 
Plugin myinfo =
{
    
name "Test",
    
author "",
    
version "1.0",
    
url ""
}

public 
void OnPluginStart(){
    
kredi CreateConVar("test""150""");
    
tagi CreateConVar("test2""""");
    
AutoExecConfig(true"configfile");

it creates a file, but when i change that file and reload map, it doesn't be like in the file, it always has default value, unless i reload plugin.

i think about adding AutoExecConfig to OnMapStart but i am not sure that solve the problem.


i also have a lot of plugins that create config files, some of them run without problem, and some have this problem.
dangerlord63 is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 04-28-2018 , 15:50   Re: Config Load
Reply With Quote #2

The config you set with AutoExecConfig is only run once per plugin load, so calling it more often or at different times isn't going to help that. If you want to run it every map, you can manually exec it in OnMapStart.
Fyren 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 15:46.


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