Raised This Month: $40 Target: $400
 10% 

Psychostats/HLStats Rank [1.0f] [UPDATED 05/03/06]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Statistical        Approver:   EKS (167)
Fyre
Senior Member
Join Date: Oct 2005
Location: Potsdam/Germany
Old 02-08-2006 , 20:28   Psychostats/HLStats Rank [1.0f] [UPDATED 05/03/06]
Reply With Quote #1

If you like both Stats like me and use both you might like to have your rank shown ingame. Simply type "/rank" into the chat and you get your rank shown from HL Stats and Psychostats. This is just a combination and can be set per CVAR HL Stats only, Psychostats only or to let them show you both of them at the same time.
However you have to set up this plugin first because of 2 Databases that have to be queried with different acc|password|dbname.

WORKAROUND 1.75
Use the mysql_amxx.dll/so from Zip file below (its an older version, does not support new SQLX Functions)


Requirements
AMX Mod X 1.70 (1.60 - compatibility mode)
1.75 NOT SUPPORTED YET --- GOT TO REWRITE THE QUERIES
SQL Module

Setup

Put these cvars in your amxx.cfg
Quote:
amx_pshlstats 0 // "-1" for HL Stats only, "1" for Psychostats only, "0" for both rankings
amx_hltime 120 // show every x-seconds the hl announce
amx_hlannounce 1 // "1" ON, "0" OFF
amx_pstime 120 // show every x-seconds the ps announce
amx_psannounce 1 // "1" ON, "0" OFF
This must be added to your sql.cfg in your configs directory
Quote:
amx_sql_pshost "127.0.0.1" // the sqldb ip
amx_sql_psuser "psychostats" // psycho sql user
amx_sql_pspass "hidden" // db password
amx_sql_psdb "psychostats" // Psycho DB name
amx_sql_psprefix "pstats_" // used tableprefix in psychostats db

amx_sql_hlhost "127.0.0.1" // the sqldb ip
amx_sql_hluser "hlstats" // hlstats sql user
amx_sql_hlpass "hidden" // db password
amx_sql_hldb "hlstats" // HL Stats DB name
amx_sql_hlprefix "hlstats_" // used tableprefix in HL stats db
New in 1.0f
Linux case-sensitive in HLStats tables

Report bugs please.

Usage
Quote:
say /rank
If you use statsx plugin then use the patched statsx.sma (recompile) in the attachements
Since AMXX 1.70 you can use the default statsx plugin (both /rank calls will be shown), if you dislike that use the provided patched statsx plugin

Version History
Quote:
0.1
Initial Release
0.2
[ADDED] nonrank check
0.3
[BUGFIX] nonrank check
0.4
Cleaned code
0.5
[ADDED] amx_pshlstats CVAR
[ADDED] 2 DB support (different ip)
[CHANGED] Hardcoding to setup in "sql.cfg"
0.5b
[BUGFIX] Typo in getting Steam ID
0.6
[ADDED] HL Stats announce
0.6b
[ADDED] amx_hltime and amx_hlannounce
0.7
[BUGFIX] "/rank" call made error if only one of the stats are used
[CHANGED] Adjusted Code to AMXX 1.70
1.0
[ADDED] Psychostats announce
[ADDED] amx_pstime + amx_psannounce
[BUGFIX] closing sql links
1.0b
[CHANGED] 2 Connections only now
[BUGFIX] Cleaned Code and removed laggs
1.0c
[BUGFIX] freeing sql result handle
1.0d
[BUGFIX] lag from new ps announce
1.0e
[CHANGED] Code for backward compatibility (1.60)
1.0f
[BUGFIX] SQL Code Linux case sensitive in table [prefix]_Players and [prefix]_PlayersUniqueIds from HLStats
Line 26
Code:
// REMOVE "//" for AMXX 1.60 Support //#define SUPPORT_1_60


Todo:
Requested 1.60 backwards compatibility --- DONE. 04/28/06
Add Kills/Deaths and Ratio on HLStats say announce [Requested]
1.75 compatibility [Crashes on /rank] --- sry guys I have not much time
Maybe I can also fix the lag with the new functions for querying the sql server, stay tuned.

PICS
Attached Files
File Type: sma Get Plugin or Get Source (statsx.sma - 5071 views - 49.6 KB)
File Type: sma Get Plugin or Get Source (psychohlstatsrank.sma - 4957 views - 18.9 KB)
File Type: zip modules.zip (1.17 MB, 4385 views)
__________________

Last edited by Fyre; 07-17-2006 at 07:49.
Fyre is offline
Send a message via ICQ to Fyre
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-09-2006 , 09:47   Re: Psychostats/HLStats Rank
Reply With Quote #2

Quote:
Originally Posted by Fyre
*gotta go to bed now 010 am*
, gotta wake up 50 am
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Cryonic
Senior Member
Join Date: Aug 2004
Location: Sweden..... (XCoder)
Old 02-09-2006 , 12:31  
Reply With Quote #3

Any screen? This sounds great =)
__________________
Cryonic is offline
Fyre
Senior Member
Join Date: Oct 2005
Location: Potsdam/Germany
Old 02-09-2006 , 14:55  
Reply With Quote #4

Updated with error msg and screens are available
__________________
Fyre is offline
Send a message via ICQ to Fyre
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 02-10-2006 , 20:55  
Reply With Quote #5

This sounds nice !

Question1:
What if i have both ranks on different mysql-hosts ?

Question2:
Do i have to disable any regular amxx-plugin to use your '/rank'-command ?
AllMassive is offline
Fyre
Senior Member
Join Date: Oct 2005
Location: Potsdam/Germany
Old 02-11-2006 , 08:04  
Reply With Quote #6

Question1: I thought of that, I could implent it for 2 SQL Server
Question2:
Quote:
Originally Posted by Fyre
Turn statsx.amxx off before running this plugin
__________________
Fyre is offline
Send a message via ICQ to Fyre
The Real DeAtH07
Junior Member
Join Date: Aug 2005
Old 02-11-2006 , 19:14  
Reply With Quote #7

Hey, i put this on my ns 3.1.2 server and it lags the crap out of it.

Any ideas?
The Real DeAtH07 is offline
Send a message via AIM to The Real DeAtH07
Fyre
Senior Member
Join Date: Oct 2005
Location: Potsdam/Germany
Old 02-11-2006 , 19:30  
Reply With Quote #8

no not yet, it does not lag for me I'll look into it tomorrow
which version?
try 0.5b now it should be ok
__________________
Fyre is offline
Send a message via ICQ to Fyre
Silver Dragon
Veteran Member
Join Date: Jan 2005
Location: Chicago, Illinois
Old 03-05-2006 , 16:55  
Reply With Quote #9

This is nice. Good work.
Silver Dragon is offline
Send a message via AIM to Silver Dragon Send a message via MSN to Silver Dragon Send a message via Yahoo to Silver Dragon
diamond-optic
Veteran Member
Join Date: May 2005
Location: Upstate New York
Old 03-05-2006 , 19:27  
Reply With Quote #10

i was getting this

Code:
[AMXX] Run time error 10: native error (native "dbi_close")
[AMXX]    [0] psychohlstatsrank0.6b.sma::handle_rank (line 232)
but since im only using psychostats I commented out line 232 (which was like closing the hlstats db or something) and I dont get that error anymore...
__________________
diamond-optic is offline
Send a message via AIM to diamond-optic
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 16:19.


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