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

Auto Restart /top15 for month


Post New Thread Reply   
 
Thread Tools Display Modes
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 02-23-2024 , 16:07   Re: Auto Restart /top15 for month
Reply With Quote #11

Quote:
Originally Posted by Bugsy View Post
Why not just execute "csstats_reset 1" ?
Quote:
Originally Posted by bakugan View Post
I need the plugin for monthly restart.
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.
__________________
mlibre is offline
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
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 02-24-2024 , 08:06   Re: Auto Restart /top15 for month
Reply With Quote #13

@Bugsy mmm clear, the file created is meant to indicate that the task has already been executed as a filter method
__________________
mlibre is offline
bakugan
Member
Join Date: Dec 2023
Location: Bulgaria
Old 02-26-2024 , 11:25   Re: Auto Restart /top15 for month
Reply With Quote #14

Quote:
Originally Posted by Bugsy View Post
Why not just execute "csstats_reset 1" ?
I'm so tired of restarting game stats. And sometimes I forget about it, it's easiest to restart automatically
__________________
WebSite
bakugan is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-26-2024 , 16:27   Re: Auto Restart /top15 for month
Reply With Quote #15

Quote:
Originally Posted by bakugan View Post
I'm so tired of restarting game stats. And sometimes I forget about it, it's easiest to restart automatically
Did the plugin that mlibre posted above work?
__________________
Bugsy is offline
bakugan
Member
Join Date: Dec 2023
Location: Bulgaria
Old 03-03-2024 , 13:51   Re: Auto Restart /top15 for month
Reply With Quote #16

The plugin works https://nfl-cs.rf.gd/forum/viewtopic...=46&p=552#p552
__________________
WebSite
bakugan is offline
bakugan
Member
Join Date: Dec 2023
Location: Bulgaria
Old 04-04-2024 , 12:23   Re: Auto Restart /top15 for month
Reply With Quote #17

Quote:
Originally Posted by Bugsy View Post
Why not just execute "csstats_reset 1" ?

Hi, I need to delete the post. Can the post be deleting? Thank you!
__________________
WebSite
bakugan 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 14:07.


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