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

Multiple configs for statsx, misc.stats [AMXX1.8.0.3660]


Post New Thread Reply   
 
Thread Tools Display Modes
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 08-01-2008 , 02:52   Re: Multiple configs for statsx, misc.stats [AMXX1.8.0.3660]
Reply With Quote #21

Please attach Your plugin. I cannot believe that csdm_StateChange is not called.
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
RPG
Senior Member
Join Date: Aug 2005
Old 08-01-2008 , 13:04   Re: Multiple configs for statsx, misc.stats [AMXX1.8.0.3660]
Reply With Quote #22

modded statscfg.sma
Attached Files
File Type: sma Get Plugin or Get Source (statscfg.sma - 567 views - 8.0 KB)
RPG is offline
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 08-02-2008 , 04:23   Re: Multiple configs for statsx, misc.stats [AMXX1.8.0.3660]
Reply With Quote #23

Well - csdmStateChange got called after changing CSDM state everytime, but... if after that changelevel got called, - the sate of CSDM wasn't chnaged, so it wasn't called on the new map start, so the string (filename) wasn't filled up at all...
Here is the version which should definitevely solve Your problems (tested by me and it was working on me).
Code:
public plugin_init()
{
	register_plugin("Stats Configuration", AMXX_VERSION_STR, "AMXX Dev Team")
	register_menucmd(register_menuid("Stats Configuration"), 1023, "actionCfgMenu")
	get_configsdir(g_fileToSave, 63)
	format(g_fileToSave, 63, "%s/stats%s.ini", g_fileToSave, csdm_active() ? "_c" : "") // here is the main change...
	loadSettings(g_fileToSave)
	g_coloredMenus = colored_menus()
}
The rest was OK, I mean that should stay like it was (just without amx_log line).
Code:
public csdm_StateChange(csdm_state) 
{     
	if(csdm_state > 1)
		return
	get_configsdir(g_fileToSave, 63) 
	format(g_fileToSave, 63, "%s/stats%s.ini", g_fileToSave, csdm_state ? "_c" : "")
	loadSettings(g_fileToSave)
}
I'm very sorry I haven't had time to test it before, but I was heavilly working on the new ChickenMod Orange Edition version (internal beta tests phase).
Attached Files
File Type: sma Get Plugin or Get Source (statscfg.sma - 536 views - 7.9 KB)
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline
RPG
Senior Member
Join Date: Aug 2005
Old 08-03-2008 , 10:35   Re: Multiple configs for statsx, misc.stats [AMXX1.8.0.3660]
Reply With Quote #24

Perfect KWo, thanks man.
Works great, now.
RPG is offline
Reply



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:03.


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