Raised This Month: $2 Target: $400
 0% 

Restart Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lantimilan
Senior Member
Join Date: May 2016
Location: KOSOVA
Old 06-22-2020 , 02:04   Restart Stats
Reply With Quote #1

Hello i need one help, i find one plugin reset all stats every 1 month its possible to reset every 7 day stats, and to show message Stats Reset in HUD and if any possible to store to save top15 in any logs before restart to see who is rank 1,2 ,3?

PHP Code:
#include <amxmodx>

#define PLUGIN "Auto Clear Stats"
#define VERSION "2.0"
#define AUTHOR "HackForums.Ru // Remake by OciXCrom"

new g_pCvar,
    
g_pDay

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_pCvar register_cvar("acs""0")
    
g_pDay register_cvar("acs_day""1")
}

public 
plugin_cfg()
{
    new 
szDay[3]
    
get_time("%d"szDaycharsmax(szDay))
    
    if(
str_to_num(szDay) == get_pcvar_num(g_pDay))
    {
        if(
get_pcvar_num(g_pCvar) == 0)
        {
            
server_cmd("csstats_reset 1")
            
set_pcvar_num(g_pCvar1)
        }
    }
    else
    {
        if(
get_pcvar_num(g_pCvar) == 1)
            
set_pcvar_num(g_pCvar0)
    }


Last edited by lantimilan; 06-22-2020 at 02:08.
lantimilan is offline
Send a message via MSN to lantimilan
Supremache
Senior Member
Join Date: Sep 2019
Old 06-22-2020 , 14:36   Re: Restart Stats
Reply With Quote #2

Quote:
Originally Posted by lantimilan View Post
Hello i need one help, i find one plugin reset all stats every 1 month its possible to reset every 7 day stats, and to show message Stats Reset in HUD and if any possible to store to save top15 in any logs before restart to see who is rank 1,2 ,3?

PHP Code:
#include <amxmodx>

#define PLUGIN "Auto Clear Stats"
#define VERSION "2.0"
#define AUTHOR "HackForums.Ru // Remake by OciXCrom"

new g_pCvar,
    
g_pDay

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_pCvar register_cvar("acs""0")
    
g_pDay register_cvar("acs_day""1")
}

public 
plugin_cfg()
{
    new 
szDay[3]
    
get_time("%d"szDaycharsmax(szDay))
    
    if(
str_to_num(szDay) == get_pcvar_num(g_pDay))
    {
        if(
get_pcvar_num(g_pCvar) == 0)
        {
            
server_cmd("csstats_reset 1")
            
set_pcvar_num(g_pCvar1)
        }
    }
    else
    {
        if(
get_pcvar_num(g_pCvar) == 1)
            
set_pcvar_num(g_pCvar0)
    }

Try this I made confing file for cvars and log message for top 1/2/3 you will find the message in cstrike/addons/amxmodx/logs/ClearStats_%s.log

PS: Not Tested
Attached Files
File Type: sma Get Plugin or Get Source (AutoClearStats.sma - 10 views - 2.4 KB)
File Type: cfg ClearStats.cfg (509 Bytes, 4 views)
Supremache is offline
lantimilan
Senior Member
Join Date: May 2016
Location: KOSOVA
Old 06-23-2020 , 14:13   Re: Restart Stats
Reply With Quote #3

I test your version i thing something is wrong in stats save very much player place is wrong i ask every 7 day to reset before reset to save top3 player in rank top1, top2,top3 your plugin is wrong reset stats and save all time
lantimilan is offline
Send a message via MSN to lantimilan
Supremache
Senior Member
Join Date: Sep 2019
Old 06-23-2020 , 14:37   Re: Restart Stats
Reply With Quote #4

Quote:
Originally Posted by lantimilan View Post
I test your version i thing something is wrong in stats save very much player place is wrong i ask every 7 day to reset before reset to save top3 player in rank top1, top2,top3 your plugin is wrong reset stats and save all time
There no problem with my plugin old version had already have cvar for days of when plugin restart cs stats of your server and I added hud message and chat message as you asked and made log file for top 1/2/3 this plugin will send message Log for who is top1/2/3 with time and days and year
Supremache is offline
lantimilan
Senior Member
Join Date: May 2016
Location: KOSOVA
Old 06-23-2020 , 16:05   Re: Restart Stats
Reply With Quote #5

i dont know why are you said i need just one thing when we make 7 day to reset all stats in server but before all to save 3 person who are in top15 i mean #1 #2 #3 to take any bonus this form
lantimilan is offline
Send a message via MSN to lantimilan
Supremache
Senior Member
Join Date: Sep 2019
Old 06-23-2020 , 21:45   Re: Restart Stats
Reply With Quote #6

Quote:
Originally Posted by lantimilan View Post
i dont know why are you said i need just one thing when we make 7 day to reset all stats in server but before all to save 3 person who are in top15 i mean #1 #2 #3 to take any bonus this form
I know, add this plugin and go to cstrike/addons/amxmodx/logs and there you will find file name is ClearStats with time "year/day/hour" and when stats restart go check logs files and you will get who was top 1/2/3 in your server

Like this :


Name Of file + Time, mean if plugin has restart it in 1/7/2020 then go to cstrike/addons/amxmodx/logs/ClearStats_1/7/2020.log
And you will get in file who was top 1/2/3 in that time
Supremache is offline
lantimilan
Senior Member
Join Date: May 2016
Location: KOSOVA
Old 06-24-2020 , 07:19   Re: Restart Stats
Reply With Quote #7

Supermache look this : http://prntscr.com/t5km9w
I have this cvar : clearstats "1"
cs_day "7"
cs_toprank "3"
lantimilan is offline
Send a message via MSN to lantimilan
Supremache
Senior Member
Join Date: Sep 2019
Old 06-24-2020 , 12:57   Re: Restart Stats
Reply With Quote #8

Quote:
Originally Posted by lantimilan View Post
Supermache look this : http://prntscr.com/t5km9w
I have this cvar : clearstats "1"
cs_day "7"
cs_toprank "3"
Yes, day/month/year server time name player steamid after 7 days check log file.againand see who is top1/2/3
Supremache 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 11:58.


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