Raised This Month: $51 Target: $400
 12% 

Psychostats Interface Plugin (By: StormTrooper)


Post New Thread Reply   
 
Thread Tools Display Modes
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 12-16-2004 , 07:20  
Reply With Quote #21

Quote:
"/pstop10, /psstats, or /psrank" in public chat show nothing.
I had this issue myself, I actually had to go into the source and tell it that the commands were those then recompile it (I'm running linux). I also noticed there was no if statement to see if that variable was on or not, the ONLY things in the plugin were the defaults (it overwrote them).
Anyway, I think here is a fix to it (not the most efficient way to do it but it ***SHOULD*** handle the ps_rank_override.

Code:
public HandleSay(id) {     new Speech[128]     read_args(Speech,127)     remove_quotes(Speech)     load_pscvars()     if(get_cvar_num("ps_rank_override") == 1)     {                /*         register_clcmd("say /statsme","cmdStatsMe",0,"- displays your stats")         register_clcmd("say /stats","cmdStats",0,"- displays others stats")         register_clcmd("say /top15","cmdTop15",0,"- displays top 15 players")         register_clcmd("say /rank","cmdRank",0,"- displays your server stats")         */                 if(containi(Speech, "/stats") == 0)         {             show_motd(id, psrankurl, "Stats: Powered by PsychoStats")             return PLUGIN_HANDLED         }                 if(containi(Speech, "/top15") == 0 || containi(Speech, "/top10") == 0)         {             new smalltt[256]             format (smalltt,255,"%s/smalltopten.php",psrankurl)             show_motd(id, smalltt, "Top 10: Powered by PsychoStats")             return PLUGIN_HANDLED         }             if(containi(Speech, "/rank") == 0 || containi(Speech, "/statsme") == 0)         {             new Result:result             new cmd[128], rankurl[256], plrmatch[65], authid[33], name[65], ipaddr[16], plrid[16]                         _getuserinfo(id, authid, name, ipaddr, plrmatch)                 // Connect to mysql server             connectDB()                         format(cmd, 127, "SELECT plrid FROM %s WHERE %s='%s'", plrtbl, psuniqueid, plrmatch)                         if((result = doQuery(result, cmd)) == RESULT_FAILED)                 return PLUGIN_HANDLED                     if(dbi_nextrow(result) > 0)             {                 dbi_field(result, 1, plrid, 15)             }                 if (equal(plrid,""))             {                 client_print(id,print_chat, "%L", LANG_PLAYER, "USERNAME_NOMATCH", psuniqueid, plrmatch)                 format(rankurl,255,"%s/index.php?search=%s",psrankurl, plrmatch)             }                         else             {                 format(rankurl,255,"%s/player.php?id=%s",psrankurl,plrid)             }                             show_motd(id, rankurl, "Rank: Powered by PsychoStats")                         return PLUGIN_HANDLED         }             if(containi(Speech, "/search") == 0)         {             new arg1[32], arg2[32]             parse(Speech,arg1,31,arg2,31)             new rankurl[256]             format(rankurl,255,"%s/index.php?search=%s",psrankurl,arg2)             show_motd(id, rankurl, "Stats Search: Powered by PsychoStats")             return PLUGIN_HANDLED         }     }     else     {         if(containi(Speech, "/psstats") == 0)         {             show_motd(id, psrankurl, "Stats: Powered by PsychoStats")             return PLUGIN_HANDLED         }                 if(containi(Speech, "/pstop15") == 0 || containi(Speech, "ps/top10") == 0)         {             new smalltt[256]             format (smalltt,255,"%s/smalltopten.php",psrankurl)             show_motd(id, smalltt, "Top 10: Powered by PsychoStats")             return PLUGIN_HANDLED         }             if(containi(Speech, "/psrank") == 0 || containi(Speech, "/psstatsme") == 0)         {             new Result:result             new cmd[128], rankurl[256], plrmatch[65], authid[33], name[65], ipaddr[16], plrid[16]                         _getuserinfo(id, authid, name, ipaddr, plrmatch)                 // Connect to mysql server             connectDB()                         format(cmd, 127, "SELECT plrid FROM %s WHERE %s='%s'", plrtbl, psuniqueid, plrmatch)                         if((result = doQuery(result, cmd)) == RESULT_FAILED)                 return PLUGIN_HANDLED                     if(dbi_nextrow(result) > 0)             {                 dbi_field(result, 1, plrid, 15)             }                 if (equal(plrid,""))             {                 client_print(id,print_chat, "%L", LANG_PLAYER, "USERNAME_NOMATCH", psuniqueid, plrmatch)                 format(rankurl,255,"%s/index.php?search=%s",psrankurl, plrmatch)             }                         else             {                 format(rankurl,255,"%s/player.php?id=%s",psrankurl,plrid)             }                             show_motd(id, rankurl, "Rank: Powered by PsychoStats")                         return PLUGIN_HANDLED         }             if(containi(Speech, "/search") == 0)         {             new arg1[32], arg2[32]             parse(Speech,arg1,31,arg2,31)             new rankurl[256]             format(rankurl,255,"%s/index.php?search=%s",psrankurl,arg2)             show_motd(id, rankurl, "Stats Search: Powered by PsychoStats")             return PLUGIN_HANDLED         }     }     return PLUGIN_CONTINUE }

It has NOT been tested...at all

also
in the plugin_init add
Code:
    register_cvar("ps_rank_override","0")
Underneath
Code:
    register_cvar("ps_logip","1")
FlyingMongoose is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 12-16-2004 , 13:51  
Reply With Quote #22

Here is the edited and compiled version (sorry to take over your plugin bigballer, but I wanted to get this functionality in here asap ;) I also edited the zip file, now you can just extract straight into your amxmodx directory and everything should be in place ;)
Attached Files
File Type: zip pip.zip (22.0 KB, 379 views)
FlyingMongoose is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 12-16-2004 , 14:56  
Reply With Quote #23

I could just use your changes and edit the first post.

Tell me how testing goes and how stable it is and id might just do that.
__________________

BigBaller is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 12-16-2004 , 23:34  
Reply With Quote #24

So far no server crashes from the plugin, so stability is not a problem. And it seems to work fine...I'm not having any problems with it on my linux server.
FlyingMongoose is offline
d3mv2
New Member
Join Date: Dec 2004
Old 12-20-2004 , 07:10  
Reply With Quote #25

hm... and where i have donwload all? all files needed to install? or delete this post becouse its don't help any one, or post files or linsk or something.....
d3mv2 is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 12-20-2004 , 15:58  
Reply With Quote #26

Link has been restored, look at the first post.
__________________

BigBaller is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 12-20-2004 , 19:04  
Reply With Quote #27

Well, it's been about a week and there has been no crashes due to this plugin, only issues I had were webserver/database issues (nothing to do with the gameserver). If you want bigballer you can replace the zip file with mine, or just update the code with the above changes.
FlyingMongoose is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 12-20-2004 , 19:34  
Reply With Quote #28

alright

give it until after xmas.
__________________

BigBaller is offline
d3mv2
New Member
Join Date: Dec 2004
Old 12-21-2004 , 11:22  
Reply With Quote #29

Quote:
Originally Posted by BigBaller
Link has been restored, look at the first post.
oh thx )) u did a great work! thank u for this mod for u and Zor
d3mv2 is offline
ZodiacMindwarp
Member
Join Date: Jul 2004
Location: Ventura, CA
Old 12-22-2004 , 03:53  
Reply With Quote #30

None of the"/" commands worked for me even on this new compile. It just does not do anything except show what I typed.

AMXx 1.00

Z
__________________


RichNet.tv NS:COMBAT:SoCal[RNT]
12.191.247.153:27015
RichNet.tv NS:MvM:SoCal[RNT]
12.191.247.154:27015
RichNet.tv Quake III HeadHunters SoCal[RNT]
66.254.94.10:27960
ZodiacMindwarp is offline
Send a message via AIM to ZodiacMindwarp
Reply



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 20:38.


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