Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
12 posts, 5 people · 10,934 views Thread Rating: ★★★★★
closedAMXX Psychostats
Started by Dr.G on 04-29-2009, 12:33 PM
Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
04-29-2009, 12:33 PM #1
/* Plugin generated by AMXX-Studio */rn////////////////////////////////////////////////////////////////////////////////////////////////////rn/*rnrnINFO:rnrnIf you dont have psychostats, or your webhost doesnt allow incoming traffic to your mysql server rnthis plugin will NOT work for you! This is graping the stats directly from the psychostats database.rnrnrnElse this will make people able to:rnrn- See there rank ingame while playingrnrn- See the top X players on the server (X can be set by cvar, topX will show in a motd)rnrn- See how many players that have visitet your server, how many is ranked, and how many kills there rnwere done in total over time...(this will also show in a motd). Note that if you are admin withrnIMMUNITY flag this motd will show you the current plugin settings. Not any database info tho.rnrnThis will make its own log file where errors will be writtin. The log is found in:rnrn$mod_dir/addons/amxmodx/logs/amx_psychostats/rnrnrnThere will only be one log file at any time, date and time will be listet in it. If you want a cleanrnlog file fire "amx_psychostats_wipe_log" in your console or in the server console. If you want tornrefresh the connection to the database say "amx_psychostats_refresh" in your console or in thernserver console.rnrnrnCVARS / ADMIN COMMAND(S):rnrn- Plugin on / off | 1 is ONrnamx_psychostats 1rnrn- Sets how many people /topx will show -> MAX IS AROUND 15rnamx_psychostats_topx 10rnrn- Show people available commands when they join the server? | on / off | 1 is ONrnamx_psychostats_join_msg 0rnrn- Hide chat messages? | on / off | 1 is ONrnamx_psychostats_hide_chat 0rnrnrn- Database host namernamx_psychostats_host ""rnrn- Database user namernamx_psychostats_user ""rnrn- Database user password rnamx_psychostats_pass ""rnrn- Database namernamx_psychostats_name ""rnrn- Database prefixrnamx_psychostats_prefix "ps_"rnrnrn- Force AMXX Psychostats to refresh db connection (console command)rnamx_psychostats_refreshrnrn- Will clean up AMXX Psychostats log file (console command)rnamx_psychostats_wipe_logrnrnrnrnSAY COMMANDS:rnrn/mern/rankrn/statsmern/topXrn/serverstatsrnrnrnrnTHANKS TO:rnrnnepopus - > http://forums.alliedmods.net/showthread.php?t=74581rnHawk552 - > http://forums.alliedmods.net/showthread.php?t=46779rnStormTropper @ www.psychostats.com for the queriesrnNextra for fixing my n00b loop (:rnrnrnCHANGELOG:rnrn28-04-09rnBETA releasernrn29-04-09rnPublic releasernRewrote alot of stuff...rnrn17-06-09rnFixed ranking by ip - thanks KORD 12.7rnTopX layout changed to tables, looks way better. But serverstats still looks a bit gay. Willrnbe changed later...i think...rn*/rn////////////////////////////////////////////////////////////////////////////////////////////////////
rnrnThe zip file attached is screenshots, they are not up-to-date tho, the topX motd looks better now. rnrnBugs etc goes in this thread...rnrn- CheersrnrnrnPublic Stats

G Gudi01
posted here
Posts: 3
Threads: 0
Joined: May 2009
06-13-2009, 07:51 AM #2

My server was running amxx-stats before i installed psycho stats and amxx psychostats. Now everything works fine, but i like to turn off the amx stats, because if i enter /rank or /topx i only see the old amxx stats. rnOnly /me works.rnrnWhat can i do to see the psychostats ranking with /rank?

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
06-13-2009, 12:01 PM #3

i think you can just use amx_statscfgmenu to turn off the amxx versions of those commands

G Gudi01
posted here
Posts: 3
Threads: 0
Joined: May 2009
06-13-2009, 01:51 PM #4

If i turn it off and enter /rank it says that this option is disabled on the server.

meathead
posted here
Posts: 337
Threads: 23
Joined: Aug 2007
06-13-2009, 09:45 PM #5

I have the same problem, but it's because I turned all that stuff off in my amx stats menu, and been too lazy to turn it back on!

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
06-14-2009, 05:10 AM #6

try and place it before the default stats plugins in plugins.ini and pause the /rank etc ind amx_statscfgmenu

G Gudi01
posted here
Posts: 3
Threads: 0
Joined: May 2009
06-14-2009, 07:54 PM #7

Yes, now it works.rnThank you!

K KORD_12.7
posted here
Posts: 3
Threads: 0
Joined: Jun 2009
06-17-2009, 03:59 AM #8

If Psychostats track players by IP Address, plugin not display rank :(rnAnd I did so, and rank began to work:rnrn

switch(unique_id_type)rn{rn	case 1: get_user_authid(id, uniqueid, sizeof uniqueid - 1)rn				rn	case 2: get_user_name(id, uniqueid, sizeof uniqueid - 1)rn				rn	case 3: get_user_ip(id, uniqueid, sizeof uniqueid - 1, 1)rn				rn}rn		rnnew Handle:queryrn		rnif (unique_id_type == 3)rn	query = SQL_PrepareQuery(sqlconnect, "SELECT plr.rank, (SELECT COUNT( * ) FROM %splr AS plr WHERE plr.allowrank=1) AS ranked, d.kills, d.deaths, d.hits, plr.skill, d.accuracy FROM %sc_plr_data as d, %splr as plr, %splr_profile as pp WHERE plr.plrid=d.plrid AND plr.uniqueid=pp.uniqueid AND pp.uniqueid LIKE INET_ATON('%s') AND plr.rank>0 AND plr.allowrank=1 ORDER BY plr.rank ASC LIMIT 1", prefix, prefix, prefix, prefix, uniqueid)rn		rnelse rn	query = SQL_PrepareQuery(sqlconnect, "SELECT plr.rank, (SELECT COUNT( * ) FROM %splr AS plr WHERE plr.allowrank=1) AS ranked, d.kills, d.deaths, d.hits, plr.skill, d.accuracy FROM %sc_plr_data as d, %splr as plr, %splr_profile as pp WHERE plr.plrid=d.plrid AND plr.uniqueid=pp.uniqueid AND pp.uniqueid='%s' AND plr.rank>0 AND plr.allowrank=1 ORDER BY plr.rank ASC LIMIT 1", prefix, prefix, prefix, prefix, uniqueid)
rnPlease, fix source file, this plugin is amazing! Thank you.rnrnPSrnSorry for my english :)

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
06-17-2009, 09:44 AM #9

Oh i forgot a '1' there. Updated, thanks! See changelog.rnrn- Cheers

K KORD_12.7
posted here
Posts: 3
Threads: 0
Joined: Jun 2009
06-17-2009, 08:30 PM #10

Integer value of an IP address kept in Psychostats database. If (unique_id_type==3) you must slightly change your querry:rnrn

AND pp.uniqueid='%s'
change to
AND pp.uniqueid LIKE INET_ATON('%s')
K KORD_12.7
posted here
Posts: 3
Threads: 0
Joined: Jun 2009
06-20-2009, 12:15 AM #11

Dr.GrnCan you add support of HLstats to your plugin?

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
06-20-2009, 01:29 PM #12

shouldnt it just be replacing the queries? Since it looks like you know something about this, fell free to fit the code to HLstats and release it or what ever. I dont use HLstats so i wont do it.

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC