Raised This Month: $32 Target: $400
 8% 

Psychostats Interface Plugin Rearmed


Post New Thread Reply   
 
Thread Tools Display Modes
Author
axon_pl
Member
Join Date: Jan 2009
Plugin ID:
1211
Plugin Version:
0.94
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    19 
    Plugin Description:
    Ingame plugin for PsychoStats statistical system. Provide commands like 'top10', 'rank' , etc.
    Old 10-07-2009 , 18:11   Psychostats Interface Plugin Rearmed
    Reply With Quote #1

    Psychostats Interface Plugin Rearmed
    (original topic HERE)
    Images:


    Description:
    - Ingame plugin for Psychostats statistics. Provides various chat commands to display top10, rank, etc.
    - Plugin automatically detected how psychostats calculate stats - by ipaddr, worldid (steamID) or name. Thus plugin can work on LAN and Internet servers.
    - Plugin tested on CSS Internet server (psychostats 3.1/works by steamID).
    - Please give feedback if plugin works on your server (mod and psychostats version)!
    - This plugin only shows data gathered by Psychostats script (stats.pl), it doesn't collect any data
    Version:
    - 0.95
    Authors:
    - Axon (axon_pl), O!KAK (urus), MoggieX, Packhead, LordMarqus
    Contact:
    - Axon (axon_pl) - [email protected]
    Changelog:
    0.3 by MoggieX
    new cvar: psychstats_mode - controls "rank" and "place" requests, 1 - displays only menu, 2 - dipslays only chat , 3 - both
    new cvar: psychstats_url - Alter to your own URL or own message (to disable leave blank)

    0.4 by Axon
    "say" command handler modifications, added support for "next" command

    0.5 by Packhead ([email protected])
    "rank" output translation, corrected floatdiv warnings

    0.6 by Packhead ([email protected])
    chat output modifications and cleanup
    new cvar: psychstats_url - additional url to display, when handling rank/place request, disabled when left empty

    0.7 by Packhead ([email protected])
    chat output modification and translations

    0.8 by Axon
    - added autoconfig functionality (auto reads config, creates new if none is found)
    - added check for supported psychostats version (currently 3.1)
    - added round start notifications (db error, not supported (if ps ver differs from 3.1)
    - added psychostats table prefix do config (ie. ps)
    - added psychostats command prefix to config (ie. 'psycho' will result in accepting only commands like 'psychorank', 'psychotop')
    - added new say command 'help' which displays sourcemod like menu (with pagination) with all available commands (as links)
    - added statsme command that displays statsme panel with all useful infos
    - added kdr (client chat only), kdeath (public chat) command which displays KDR in chat
    - added chat details to config (short with skill and position, and detailed with all info)
    - chat output colors (idea and first version - thx to Packerhead)
    - additonal translations (new things only in english and polish)
    - addded some additional console logging
    - code improvements

    0.8.1 by Axon
    - fixed bug causing table prefix and db config name to be readed inproperly
    - added support for team chat (command now works in team chat)
    - as requested: player positon with overall number of ranked players (eg. Player xxx is ranked 1/2000)
    - changed "help" chat command to "psycho" so it doesn't interfere with other plugins

    0.9 by Axon
    - added support for "session" command (WARNING: accuracy of this command highly depends on how often Psychostats script - stats.pl - is run, in my case it's run every minute, so it's very accurate)
    - code improvements

    0.91
    - bugfix: bug with wrong command prefix recognition
    - bugfix: plugin version displayed from config instead of actual version

    0.92
    - bugfix: translations are now displayed in client's language
    - added italian translation by t3rm1nal_s(0ut

    0.93
    - added utf8 support for names (thx psychonic)
    - added support for HL2DM (not tested)
    - added mod detection (just main ones)

    0.94 by LordMarqus
    - fixed closing database connections
    - fixed nicknames length in "top" and "next" (were truncated)
    - fixed showing Skill in "rank" panel
    - removed unnecessary error check in ReadConfigCallback2 (it caused "Psychostats -> Databese: Can`t find uniqueid var in config table")
    - removed dots from online time translation (and few other fixes)

    Newest version

    0.95
    -bugfix: extended db table prefix variable size to 64

    Requirements:
    - The latest sourcemod build
    - Psychostats web statistic (versions 3.1 or newer)
    Chat commands:
    "psycho" Show menu with all commands available

    "rank" Shows user stats (user only)

    "place" Shows user stats (all)

    "kdr" Shows user kill/death ratio (user only)

    "kdeath" Shows user kill/death ratio (all)

    "top10/top" Shows top 10 players on server

    "next" Shows 10 next players ahead of user

    "statsme" Shows detailed information about player

    "session" Shows current session info (WARNING: accuracy of this command highly depends on how often Psychostats script - stats.pl - is run, in my case it's run every minute, so it's very accurate)
    Cvars:
    psychstats_ra_version - Plugin version (renamed as original is already taken)

    psychstats_mode - "rank" specific cvar, 1 - for info in menu, 2 - info in chat, 3 - both

    psychstats_url - URL to full stats. Leave blank to disable, useful if you advertise through another plugin (default "")

    psychstats_chat_details - Level of detail in chat when user says rank, 1 - summary, 2 - detailed (default 1)

    psychstats_db_prefix - Database tables prefix (without underscore), eg. 'ps' (default "ps")

    psychstats_command_prefix - Chat commands prefix ex. '/', will result in accepting only commands like '/rank', '/top') (default "")

    psychstats_db_config_prefix - Name of connection string in Sourcemod databese config file (default "psstats")
    Setup:
    psychostats_threded_uni.smx goes to:
    -> addons/sourcemod/plugins

    psychostats_threded_uni.sp goes to:
    -> addons/sourcemod/scripting

    plugin.psychostats.txt goes to:
    -> addons/sourcemod/translations

    This code goes to:
    -> addons/sourcemod/configs/databases.cfg

    Code:
    "psstats"
        {
           "driver" "mysql"
           "host" "ip_of_your_sql_db"
           "database" "db_name"
           "user" "db_user"
           "pass" "db_password"
           //"timeout" "0"
           "port" "3306"
        }
    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
    To Do:
    - Full support for all mods (current version tested on internet Counter Strike Source server, should work for LAN servers)
    - Read of additional data from Psychostats database
    - Ingame notifications (like 'xxx got 3 pts for killing yyy), based on Psychostats config
    - Translations (only english and polish are fully supported)
    - Requests (if possible)
    Thanks to:
    - O!KAK for original version
    - MoggieX, Packhead, LordMarqus for their additions
    - Allied Modders Forums for all necessary knowledge and suggestions
    Attached Files
    File Type: txt plugin.psychostats.txt (9.4 KB, 3217 views)
    File Type: sp Get Plugin or Get Source (psychostats_threaded_uni.sp - 5426 views - 60.2 KB)
    __________________
    Razer DeathAdder
    Razer Lycosa
    Razer Destructor
    Razer Megalodon - soon

    My clan website

    Last edited by axon_pl; 05-01-2010 at 11:47. Reason: no need to attach smx when sp compiles fine on forum
    axon_pl is offline
    SuperShadow
    SourceMod Donor
    Join Date: Jun 2008
    Location: Westminster, MD
    Old 10-07-2009 , 20:10   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #2

    It works on my TF2 server, thanks for the update!
    SuperShadow is offline
    /̵͇̿̿/'̿-̅-̅-̅° PIG
    Member
    Join Date: Jul 2009
    Old 10-08-2009 , 11:15   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #3

    Hey i am having trouble setting this up on my server. I have the files all in the right place on the game server and i have edited the database file. So i get this in server console:

    L 10/08/2009 - 07:40:12: [psychostats_threaded_uni.smx] Psychostats -> Config: Table prefix readed from config file: ps
    L 10/08/2009 - 07:40:12: [psychostats_threaded_uni.smx] Psychostats -> Config: Plugin version id 0.9
    L 10/08/2009 - 07:40:12: [psychostats_threaded_uni.smx] Psychostats -> Config: Db config name readed from config file: psstats

    and then a bit later:
    L 10/08/2009 - 07:40:12: [psychostats_threaded_uni.smx] Psychostats -> Database: Connection failure: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    can u point me in the right direction and what other info do u need from me???
    Thanks in advance for any help
    /̵͇̿̿/'̿-̅-̅-̅° PIG is offline
    axon_pl
    Member
    Join Date: Jan 2009
    Old 10-08-2009 , 12:22   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #4

    make sure, that it is a valid mysql socket, or just simply put ip of your server in there
    __________________
    Razer DeathAdder
    Razer Lycosa
    Razer Destructor
    Razer Megalodon - soon

    My clan website
    axon_pl is offline
    /̵͇̿̿/'̿-̅-̅-̅° PIG
    Member
    Join Date: Jul 2009
    Old 10-08-2009 , 12:32   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #5

    Thanks..I am just waiting for my friend to come online he was the one helping me set this up, as i don't know much about this stuff..ex..mysql, php.... we tried last night using his web server cause the one i get with my game server only allows one database and that is in use with the forums...really stupid. Anyways I will post again later. hopefully i can get it to work
    /̵͇̿̿/'̿-̅-̅-̅° PIG is offline
    PStar
    Veteran Member
    Join Date: Mar 2008
    Old 10-08-2009 , 16:17   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #6

    Hy, plugin says it version is 0.9 in the log files but in HLSW it show 0.81.
    PStar is offline
    axon_pl
    Member
    Join Date: Jan 2009
    Old 10-08-2009 , 18:11   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #7

    PStar, its because value of this cvar is stored in config created in previous version

    you can find it in cstrike\cfg\sourcemod\plugin.psychstats.txt
    __________________
    Razer DeathAdder
    Razer Lycosa
    Razer Destructor
    Razer Megalodon - soon

    My clan website
    axon_pl is offline
    Sleeper_LT
    Junior Member
    Join Date: Feb 2007
    Old 10-10-2009 , 13:13   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #8

    L 10/10/2009 - 19:416: [psychostats_threaded_uni.smx] Psychostats -> Database: MySQL Error: Table 'stats_vip.ps_config' doesn't exist

    Why table 'stats_vip.ps_config' but not 'ps_config' ?

    Where is problem ?

    Last edited by Sleeper_LT; 10-10-2009 at 13:17.
    Sleeper_LT is offline
    axon_pl
    Member
    Join Date: Jan 2009
    Old 10-10-2009 , 14:07   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #9

    UPDATE TO 0.91


    somehow i cant change attachments, so here are latest files

    @Sleeper_LT stats_vip is propably database name, how you specified table prefix in your psychostats config ?
    Attached Files
    File Type: sp Get Plugin or Get Source (psychostats_threaded_uni.sp - 2029 views - 53.3 KB)
    File Type: smx psychostats_threaded_uni.smx (18.4 KB, 735 views)
    File Type: txt plugin.psychostats.txt (7.3 KB, 725 views)
    __________________
    Razer DeathAdder
    Razer Lycosa
    Razer Destructor
    Razer Megalodon - soon

    My clan website

    Last edited by axon_pl; 10-10-2009 at 14:30.
    axon_pl is offline
    Sleeper_LT
    Junior Member
    Join Date: Feb 2007
    Old 10-10-2009 , 14:45   Re: Psychostats Interface Plugin Rearmed
    Reply With Quote #10

    Quote:
    Originally Posted by axon_pl View Post
    @Sleeper_LT stats_vip is propably database name, how you specified table prefix in your psychostats config ?
    databases.cfg:
    Code:
    "Databases"
    {
     "driver_default"  "mysql"
     
     "psstats" 
     {        
           "driver"    "mysql"        
             "host"     "ip_adress_my_db"        
             "database"    "stats_vip"        
             "user"     "ps_stats"        
             "pass"     "password" 
    }
    plugin.psichostats.cfg:

    Code:
     
    psychstats_db_config_prefix "psstats"
    psychstats_db_prefix "ps"
    21:50:56 [psychostats_threaded_uni.smx] Psychostats -> Config: Table prefix readed from config file: ps
    21:50:56 [psychostats_threaded_uni.smx] Psychostats -> Config: Plugin version id 0.91
    21:50:56 [psychostats_threaded_uni.smx] Psychostats -> Config: Db config name readed from config file: psstats

    L 10/10/2009 - 21:507: [psychostats_threaded_uni.smx] Psychostats -> Database: MySQL Error: Table 'stats_vip.ps_config' doesn't exist

    Wheare my mistake ?

    P.S. My db table prefix is ps

    Last edited by Sleeper_LT; 10-10-2009 at 15:06.
    Sleeper_LT 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 03:35.


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