AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   Psychostats Interface Plugin (https://forums.alliedmods.net/showthread.php?t=69102)

urus 03-28-2008 13:26

Psychostats Interface Plugin
 
4 Attachment(s)



Description

Plugin provides ingame commands /rank and /top10 for Psychostats statistic.
Plugin automatically detected how psychostats calculate stats - by ipaddr, worldid (steamID) or name. Thus plugin can work on LAN and Internet servers.
Also plugin can work on all mods (CSS, DoDS, TF2, etc..)

Plugin tested on LAN TF2 server (psychostats 3.1/works by ipaddr) and CSS Internet server (psychostats 3.1/works by steamID/name).
Please give feedback if plugin works on your server (mod and psychostats version)!


Requirements

Psychostats web statistic (versions 3.1 or 3.0.x)


Chat commands

/rank - display menu with individual player information
/top10 - display menu with top10 players


Installation

1. Copy psychostats_threaded_uni.smx into sourcemod\plugins folder
2. Copy plugin.psychostats.txt into sourcemod\translations folder
3. Copy this db information into sourcemod\configs\databases.cfg file (copy/past) and change bold text ("psstats" - should not change!):

Code:

"psstats"
{       
      "driver" "mysql"       
      "host" "localhost"       
      "database" "your_db_name"       
      "user" "your_db_user"       
      "pass" "your_db_password"       
      //"timeout" "0"       
      "port" "3306"
}

4. Restart game server

* you can change psychostats database tables prefix at the top of .sma file (if it need):

Code:

// Your psychostats tables prefix here
new String:MysqlPrefix[10] = "ps";

Quote:

Most common problem (mysql and srcds on different boxes)

Note: You will need to setup MySQL server to accept connections from your game server, or the plugin simply wont work

Example error:
L 02/08/2009 - 23:36:30: [psychostats_threaded_uni.smx] Database failure: [1045]: Access denied for user 'totalblo_user'@'216.155.146.22' (using password: YES)

Answer:
Your mysql user totalblo_user must have access rights to psychostats database from srcds ip
Changelog
0.2
Fixed mysql query for /top10 (query was too short for steamids and may be for nicks)
Added mysql errors into sourcemod`s error log

0.1
Release


Thanks authors sourcebans and N1G-TF2-RANK for ideas.



WARNING! Latest extended version of this plugin here:
http://forums.alliedmods.net/showthread.php?t=105735

V0gelz 03-28-2008 13:30

Re: Psychostats Interface Plugin
 
Nicely done.
gj :)

xJonny 03-28-2008 13:35

Re: Psychostats Interface Plugin
 
It would be nice to have the something that:

Displays your rank and skill as a public chat message.
Shows the next 4 players above and below you in the stats.
Shows a box on the left filled with your stats (like statsme)
Shows how long its been since the stats were updated.
Shows the statsme window for that player. (only players currently on the server)

Otherwise GJ

urus 03-30-2008 10:54

Re: Psychostats Interface Plugin
 
Quote:

Originally Posted by xJonny (Post 603356)
It would be nice to have the something that:

I know about this plugin, but i wanted lightweight plugin.

To all.
Please download new version (0.2). I find and fixed small error for /top10 command.
Also download new plugin.psychostats.txt.
See attach in first post.

n00by 03-30-2008 12:19

Re: Psychostats Interface Plugin
 
Hello!

I try to install the plugin, but i get this error when i start my server (cs:s)

Code:

[psychostats_threaded_uni.smx] Database failure: Could not find database conf "psstats"
database.conf looks like this

Code:

"Databases"
{
    "driver_default"        "mysql"
   
    "default"
    {
        "driver"            "default"
        "host"                "localhost"
        "database"            "sourcemod"
        "user"                "root"
        "pass"                ""
        //"timeout"            "0"
        //"port"            "0"
    }
   
    "storage-local"
    {
        "driver"            "sqlite"
        "database"            "sourcemod-local"
    }
}
"psstats"
{       
      "driver" "mysql"       
      "host" "127.0.0.1"       
      "database" "psychostats"       
      "user" "xxx"       
      "pass" "xxx"       
      //"timeout" "0"       
      "port" "3306"
}


urus 03-30-2008 13:08

Re: Psychostats Interface Plugin
 
You have wrong location psstats.
Must be:


Code:

"Databases"
{
    "driver_default"        "mysql"
   
    "default"
    {
        "driver"            "default"
        "host"                "localhost"
        "database"            "sourcemod"
        "user"                "root"
        "pass"                ""
        //"timeout"            "0"
        //"port"            "0"
    }
   
    "storage-local"
    {
        "driver"            "sqlite"
        "database"            "sourcemod-local"
    }

    "psstats"
    {       
        "driver" "mysql"       
        "host" "127.0.0.1"       
        "database" "psychostats"       
        "user" "xxx"       
        "pass" "xxx"       
        //"timeout" "0"       
        "port" "3306"
    }
}


n00by 03-30-2008 13:16

Re: Psychostats Interface Plugin
 
Hello!

It won't work :(

look, this is the next error i get:

Code:

L 03/30/2008 - 19:54:19: [SM] Detected parse error(s) in file "/home/server/srcds/cstrike/addons/sourcemod/configs/databases.cfg"
L 03/30/2008 - 19:54:19: [SM] Line 22: Line contained too many invalid tokens
L 03/30/2008 - 19:54:19: -------- Mapchange to de_dust --------
L 03/30/2008 - 19:54:19: Error log file session closed.
L 03/30/2008 - 19:54:19: [SM] Failed to load plugin "._psychostats_threaded_uni.smx": Error 1 while parsing plugin
L 03/30/2008 - 19:54:19: [psychostats_threaded_uni.smx] Database failure: Could not find database conf "psstats"


urus 03-30-2008 14:12

Re: Psychostats Interface Plugin
 
1 Attachment(s)
Delete your databases.cfg and take from attach.

n00by 03-30-2008 14:23

Re: Psychostats Interface Plugin
 
Thank you very mutch, it works amazing :)

Greets

Olly 04-01-2008 10:43

Re: Psychostats Interface Plugin
 
Quote:

Originally Posted by urus (Post 604230)
I know about this plugin, but i wanted lightweight plugin.

To all.
Please download new version (0.2). I find and fixed small error for /top10 command.
Also download new plugin.psychostats.txt.
See attach in first post.

Wow, didn't even think people still on the website :o


All times are GMT -4. The time now is 02:18.

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