AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Most Active (play time rank system) webpanel included [Updated 3-Jan-2023] (https://forums.alliedmods.net/showthread.php?t=190293)

Franc1sco 07-16-2012 21:29

[ANY] Most Active (play time rank system) webpanel included [Updated 3-Jan-2023]
 
Description

A rank system based in the time played, this save CT, T and Spectator time played and show in rank.

This plugin can use a sqlite then you not need a mysql


Commands
Code:

sm_active - (!active) Show most active menu
sm_wasted - replays in chat: "[Most Active] Players wasted a total of %d hours %d minutes %d seconds on this server"

Also you can use !active command with a argument, like !active STEAM_1:0:25671458 for search the time played in the server that have the user with the steamid "STEAM_1:0:25671458"

Cvars
Autogenerate config on first load into cfg/sourcemod/mostactive.cfg
Code:

sm_mostactive_logs "0" // Enable query logging for debug
sm_mostactive_prunetime "30" // Time on days for prune inactive users. 0 = never prune users.

You can test this plugin here:
http://cache.<a href="http://www.gam...FFF_000000.png


Natives for developers:

PHP Code:

/*********************************************************
 * Called when a new player will be written to db
 *
 * @param client        the new client that will be added
 * @NoReturn
 *********************************************************/
forward void MostActive_OnInsertNewPlayer(int client);


/*********************************************************
 * Return the playtime of the client in a team
 *
 * @Return                PlayTime as CT in seconds
 *********************************************************/
native int MostActive_GetPlayTimeCT(int client);


/*********************************************************
 * Return the playtime of the client in a team
 *
 * @Return                PlayTime as T in seconds
 *********************************************************/
native int MostActive_GetPlayTimeT(int client);


/*********************************************************
 * Return the playtime of the client in a team
 *
 * @Return                PlayTime as Spec in seconds
 *********************************************************/
native int MostActive_GetPlayTimeSpec(int client);


/*********************************************************
 * Return the playtime of the client in all teams
 *
 * @Return                Total PlayTime as CT, T & Spec in seconds
 *********************************************************/
native int MostActive_GetPlayTimeTotal(int client);

/*********************************************************
 * Return the playtime of the client in all teams, except spectator
 *
 * @Return                Total PlayTime as CT & T in seconds
 *********************************************************/
native int MostActive_GetPlayTimeTotalExceptSpec(int client); 


Install:

Put .smx file in addons/sourcemod/plugins


If you want to use Mysql then go to addons/sourcemod/configs/databases.cfg
Copy and paste this code (edit with your Mysql data)
Code:

        "mostactive" // dont edit
        {
                "driver"                        "mysql" // dont edit
                "host"                                "YOUR HOST" // edit this
                "database"                        "mostactive" // edit (optional)
                "user"                                "YOUR USER" // edit this
                "pass"                                "YOUR PASS" // edit this
                //"timeout"                        "0"
                "port"                        "YOUR PORT" // edit this
        }

Or if you prefer sqlite (local database) then use this code
Code:

        "mostactive"
        {
        "driver"    "sqlite"
        "database"  "mostactive"
        }


Webpanel install:

Here the info.


Donations (optional):

If you apreciate my work, you can donate me via paypal or with a trade offer


Download:

Main repository
Direct download
Code changes

Franc1sco 08-09-2012 21:29

Re: [CS:S] Most Active (time rank system)
 
I published this plugin a time ago but someone told me to leave private then I made this plugin private but is equally, I release now my plugin for everyone that want it, as I did at the time.

SHAREN 08-21-2012 06:14

Re: [CS:S] Most Active (time rank system)
 
Great idea, I will install this plugin, but I would like to know more time last week.

djoker 08-22-2012 22:35

Re: [CS:S] Most Active (time rank system)
 
L 08/22/2012 - 23:45:17: [mostactive.smx] SQL Error: near "[n[0]": syntax error
L 08/22/2012 - 23:56:16: [mostactive.smx] SQL Error: near "[n[0]": syntax error

SHAREN 08-26-2012 15:08

Re: [CS:S] Most Active (time rank system)
 
Is there a way to migrate the database from HLstatsX?

vodka00 09-18-2012 02:23

Re: [CS:S] Most Active (time rank system)
 
Is there a time limit after which it deletes your record? Because I had about 150 hrs and then I disappeared off the top. Could it be possible to setup a mysql database for it?

Thanks

HvG Community 09-19-2012 13:55

Re: [CS:S] Most Active (time rank system)
 
this is buggy,it adds random player x playtime. For example,i restarted mostactive and i already see somebody with 50 hours playtime. Can you fix this please?

Franc1sco 09-20-2012 18:56

Re: [CS:S] Most Active (time rank system)
 
Quote:

Originally Posted by vodka00 (Post 1801674)
Is there a time limit after which it deletes your record? Because I had about 150 hrs and then I disappeared off the top. Could it be possible to setup a mysql database for it?

Thanks


soon bugfix

Noitartsiger 10-03-2012 16:39

Re: [CS:S] Most Active (time rank system)
 
This is fine! :)

Can you add a menu option in the displayed ranking like "9 Back" in order to be able to go back to the main menu without typing !active again?

A little misspelling on display of own time rank: Its not "Espectator" rather "Spectator" as u stick to English I think.

Thanks for this plugin!

Regards

Noitartsiger 10-09-2012 13:53

Re: [CS:S] Most Active (time rank system)
 
Ok,
after testing I face the same issue about wrong playertimes. That is very crucial basic issue for a time rank system. Pls fix this.

Can you also add a reset option for SM root Admins (flag z)? That would be great!

Looking forward to the next update :)

Regards


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

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