AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Psychostats/HLStats Rank [1.0f] [UPDATED 05/03/06] (https://forums.alliedmods.net/showthread.php?t=24012)

Fyre 02-08-2006 19:28

Psychostats/HLStats Rank [1.0f] [UPDATED 05/03/06]
 
3 Attachment(s)
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
http://62.75.219.238/pshlstats.png

Lord_Destros 02-09-2006 08:47

Re: Psychostats/HLStats Rank
 
Quote:

Originally Posted by Fyre
*gotta go to bed now 01:30 am*

:lol:, gotta wake up 5:30 am

Cryonic 02-09-2006 11:31

Any screen? This sounds great =)

Fyre 02-09-2006 13:55

Updated with error msg :) and screens are available

AllMassive 02-10-2006 19:55

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 ?

Fyre 02-11-2006 07:04

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


The Real DeAtH07 02-11-2006 18:14

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

Any ideas?

Fyre 02-11-2006 18:30

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 :)

Silver Dragon 03-05-2006 15:55

This is nice. Good work.

diamond-optic 03-05-2006 18:27

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...


All times are GMT -4. The time now is 10:12.

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