AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need Help Please (don't know how to change it) (https://forums.alliedmods.net/showthread.php?t=53640)

zapille 04-08-2007 02:35

Need Help Please (don't know how to change it)
 
can someone change this into command cuz refresh every hour is very laggy on server and i need command to set in amx_task... it's from plugin 'csstats into html'

Code:

public plugin_init()
{   
    register_plugin("CS Stats into html","0.16","[email protected]")
    register_cvar("amx_csstatshtml","addons/amxx/custom/csstats")
    set_task(60.0,"html",0,"",0,"b")
}

public html()
{
    new mmins[6]
    get_time("%M",mmins,5)
    new mins = str_to_num(mmins)
    get_cvar_string("amx_csstatshtml",g_fileToSavehtml,63)
    format(g_fileToSavehtml, 63, "%s.html",g_fileToSavehtml)
    if (mins == 00) writehtml(g_fileToSavehtml)
    return PLUGIN_CONTINUE
}


regalis 04-08-2007 05:43

Re: Need Help Please (don't know how to change it)
 
Quote:

Originally Posted by zapille (Post 462175)
can someone change this into command cuz refresh every hour is very laggy on server and i need command to set in amx_task... it's from plugin 'csstats into html'

Code:

public plugin_init()
{   
    register_plugin("CS Stats into html","0.16","[email protected]")
    register_cvar("amx_csstatshtml","addons/amxx/custom/csstats")
    register_concmd("amx_html", "html", ADMIN_CFG, "amx_html - save html stats")
    //set_task(60.0,"html",0,"",0,"b")
}

public html(id,lvl,cid)
{
    if (!cmd_access(id, lvl, cid, 1)) return PLUGIN_HANDLED
    //new mmins[6]
    //get_time("%M",mmins,5)
    //new mins = str_to_num(mmins)
    get_cvar_string("amx_csstatshtml",g_fileToSavehtml,63)
    format(g_fileToSavehtml, 63, "%s.html",g_fileToSavehtml)
    //if (mins == 00)
    writehtml(g_fileToSavehtml)

    return PLUGIN_CONTINUE
}


try this...

greetz regalis

zapille 04-08-2007 07:19

Re: Need Help Please (don't know how to change it)
 
It's work, big THANKS ;)


All times are GMT -4. The time now is 06:45.

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