View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-24-2024 , 00:54   Re: Auto Restart /top15 for month
Reply With Quote #12

Quote:
Originally Posted by mlibre View Post
the detail of this is that if this cvar is set to 1 every time the map changes, the statistics will be reset, which the user does not want to happen... so to avoid this, we set it to 0 and also tell it to run only once a month, as requested.
Yeah, I know there was a time component, I was referring only to the method of getting stats to reset. But you can disregard, I didn't notice you were doing that with the below code. I only took a quick glance and saw you were opening and deleting files and assumed you were trying to delete the csstats.dat file, which wouldn't be possible. But you are creating a file only as an indicator/boolean for whether or not action is needed.

PHP Code:
new const cvar_csx[] = "csstats_reset"
//...
set_cvar_num(cvar_csx1
__________________
Bugsy is offline