Raised This Month: $32 Target: $400
 8% 

Which plugin writes to csstats.dat?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-18-2018 , 05:48   Which plugin writes to csstats.dat?
Reply With Quote #1

I really need to disable logging of scores during warmup.cfg, and activate it on start.cfg
I have looked in csstats.sma and found nothing..

Can someone tell me what plugin does the recording of kills / deaths to csstats.dat?

Thank you very much!
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731

Last edited by GoldNux; 04-27-2018 at 15:06.
GoldNux is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-18-2018 , 07:22   Re: What plugin writes to csstats.dat?
Reply With Quote #2

It's the CSX module that does it.
__________________
klippy is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-18-2018 , 13:23   Re: What plugin writes to csstats.dat?
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
It's the CSX module that does it.
Thank you for responding to my thread.
Is there a way for me to do what I asked in the first post?

I made a plugin with my friend that balances teams using kill / deaths ratio.
It is rendered useless if rank is affected during warmup.

Thanks again!
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731
GoldNux is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-18-2018 , 13:54   Re: What plugin writes to csstats.dat?
Reply With Quote #4

Looks like there's the csstats_pause cvar which doesn't record stats when it's set to 1.
__________________
klippy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-18-2018 , 20:41   Re: What plugin writes to csstats.dat?
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
Looks like there's the csstats_pause cvar which doesn't record stats when it's set to 1.
Nice find, Klippy

Code:
cvar_t init_csstats_pause = {"csstats_pause","0"};
Code:
bool isModuleActive(){
	if ( !(int)csstats_pause->value )
		return true;
	return false;
}
Code:
...
void CPlayer::saveBExplode()
{
	if ( !isModuleActive() )
		return;

	life.bExplosions++;
}

void CPlayer::saveBDefusing()
{
	if ( !isModuleActive() )
		return;

	life.bDefusions++;
}

void CPlayer::saveBDefused()
{
	if ( !isModuleActive() )
		return;

	life.bDefused++;
}

void CPlayer::saveShot(int weapon)
{
	if ( !isModuleActive() )
		return;

	if ( ignoreBots(pEdict) )
		return;

	victims[0].shots++;
	weapons[weapon].shots++;
	weapons[0].shots++;
	life.shots++;
	weaponsRnd[weapon].shots++;       // DEC-Weapon (round) stats
	weaponsRnd[0].shots++;            // DEC-Weapon (round) stats
}

...
__________________
Bugsy is online now
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-19-2018 , 02:28   Re: What plugin writes to csstats.dat?
Reply With Quote #6

Quote:
Originally Posted by KliPPy View Post
Looks like there's the csstats_pause cvar which doesn't record stats when it's set to 1.


Quote:
Originally Posted by Bugsy View Post
Nice find, Klippy

Code:
cvar_t init_csstats_pause = {"csstats_pause","0"};
Code:
bool isModuleActive(){
	if ( !(int)csstats_pause->value )
		return true;
	return false;
}
Code:
...
void CPlayer::saveBExplode()
{
	if ( !isModuleActive() )
		return;

	life.bExplosions++;
}

void CPlayer::saveBDefusing()
{
	if ( !isModuleActive() )
		return;

	life.bDefusions++;
}

void CPlayer::saveBDefused()
{
	if ( !isModuleActive() )
		return;

	life.bDefused++;
}

void CPlayer::saveShot(int weapon)
{
	if ( !isModuleActive() )
		return;

	if ( ignoreBots(pEdict) )
		return;

	victims[0].shots++;
	weapons[weapon].shots++;
	weapons[0].shots++;
	life.shots++;
	weaponsRnd[weapon].shots++;       // DEC-Weapon (round) stats
	weaponsRnd[0].shots++;            // DEC-Weapon (round) stats
}

...
I was so happy to see this, but unfortunatly there is a problem.
You can pause csstats.amx with that command but when you turn it back on the recorded frags will not make any sense.
After one match /top15 said the bottom fragger had 35 kills when in fact he had something like 10.

Same for all other players.
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731

Last edited by GoldNux; 04-19-2018 at 02:29.
GoldNux is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-19-2018 , 05:04   Re: What plugin writes to csstats.dat?
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
Nice find, Klippy
Thanks!
That cvar isn't documented at all, but looks like it's mentioned in a few old threads. It should be known because there are many servers using warmup plugins, where this cvar comes in perfectly.

Quote:
Originally Posted by GoldNux View Post
I was so happy to see this, but unfortunatly there is a problem.
You can pause csstats.amx with that command but when you turn it back on the recorded frags will not make any sense.
After one match /top15 said the bottom fragger had 35 kills when in fact he had something like 10.

Same for all other players.
It's a cvar, not a command, it's also not pausing csstats.amxx. You'll have to clarify what you are doing step-by-step, and also take a screenshot of that badly ordered top15.
__________________

Last edited by klippy; 04-19-2018 at 05:05.
klippy is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-19-2018 , 08:13   Re: What plugin writes to csstats.dat?
Reply With Quote #8

Quote:
Originally Posted by KliPPy View Post
Thanks!
That cvar isn't documented at all, but looks like it's mentioned in a few old threads. It should be known because there are many servers using warmup plugins, where this cvar comes in perfectly.



It's a cvar, not a command, it's also not pausing csstats.amxx. You'll have to clarify what you are doing step-by-step, and also take a screenshot of that badly ordered top15.
First, I delete all data stored in the csstats.dat file using WinCSX.exe.
Then I kill 5 bots during start.cfg with csstats_pause 0 and checked /top15

Scoreboard says I killed 5 bots and never died, /top15 says I killed 5 bots and died twice.
I'm not sure if there is a pattern, but this also happens when killing humans.
Notice that BOT polymorph kills and deaths is the sum of all the bots kills and deaths.
Last night when I played with my friends, some would get very random number of kills and deaths in /top15.
Maybe this is related and some players get their kills and deaths put together for some reason.
We are all using steam versions of the game, and are not playing on lan.
Also my server records rank by steam ID, and the rank system has worked before.
csstats_pause seems to mess things up for some reason.

I also tried killing 20 bots during warmup.cfg with csstats_pause 1
And loaded start.cfg with csstats_pause 0 and checked /top15
It still records the frags with csstats_pause 1 during warmup.

I would kill for this to work, so me and my friends can use the kill / death ratio balance plugin.
Also loads of people check /top15 and like to fight for the top during our private matches.

I really hope there is a way to do this, and I thank you all for helping out.


__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731

Last edited by GoldNux; 04-19-2018 at 09:26.
GoldNux is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 04-22-2018 , 13:57   Re: Which plugin writes to csstats.dat?
Reply With Quote #9

Update:

I tried to disable deathmsg using this plugin

It did not work
Any suggestions are more then welcome.
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731
GoldNux is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 04-25-2018 , 23:35   Re: Which plugin writes to csstats.dat?
Reply With Quote #10

There is no way im 99.9% sure u can try everything but you will waste your time. The build in stats plugin is made for public servers only.
The person who prooves me wrong hats off for you but i will have my hat on until then.
4ever16 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 22:45.


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