| closedAMXX Psychostats |
| Started by Dr.G on 04-29-2009, 12:33 PM |
Threads: 75
Joined: Nov 2007
/* 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
Threads: 0
Joined: May 2009
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?
Threads: 103
Joined: May 2005
i think you can just use amx_statscfgmenu to turn off the amxx versions of those commands
Threads: 0
Joined: May 2009
If i turn it off and enter /rank it says that this option is disabled on the server.
Threads: 23
Joined: Aug 2007
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!
Threads: 75
Joined: Nov 2007
try and place it before the default stats plugins in plugins.ini and pause the /rank etc ind amx_statscfgmenu
Threads: 0
Joined: May 2009
Yes, now it works.rnThank you!
Threads: 0
Joined: Jun 2009
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 :)Threads: 75
Joined: Nov 2007
Oh i forgot a '1' there. Updated, thanks! See changelog.rnrn- Cheers
Threads: 0
Joined: Jun 2009
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')Threads: 0
Joined: Jun 2009
Dr.GrnCan you add support of HLstats to your plugin?
Threads: 75
Joined: Nov 2007
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.

