|
下面这个是我修改的个psychostats2.2.1使用/top15 等命令的插件,是从支持2.0.1的略作修改过来的,使用正常。
不过使用这个插件后自己say /top15 可以看到排行榜,但是别人看不到自己say 的/top15 这几个字,官方的stats say 的这些命令别人就可以看到,请问如何修改一下代码使其可以让所有人都互相看到输入的命令,谢谢大家请指教。
/*
* PSRank for http://www.psychostats.com/ - By: DynAstY
* (currently for Counter-Strike)
*
* SAY COMMANDS:
*
* - /rank // shows all stats
*
* - /top15 // shows all stats
*
* - /stats // shows your player's stats (name must match in game)
*
* - /search [PLAYER NAME] // does a search with string entered as player name
*
*
* Set amx_psrank_url in amx.cfg to PsychoStats base web URL
* Example: amx_psrank_url "http://www.myclanweb.com/stats/"
*
*
*/
#include <amxmodx>
public plugin_init() {
register_plugin("PSRank", "1.1", "DynAstY")
register_clcmd("say", "HandleSay", 0, "N/A")
register_cvar("amx_psrank_url", "http://www.google.com")
}
public HandleSay(id) {
new sBaseURL[256]
get_cvar_string("amx_psrank_url",sBaseURL,255)
new args[256]
read_argv(1, args, 256)
if(containi(args, "/stats")!=-1) { // SAY /rank
show_motd(id, sBaseURL, "")
return PLUGIN_HANDLED
}
if (containi(args, "/top15")!=-1) { //SAY /top15
new gRankURL[256]
format(gRankURL, 255,"%ssmalltopten.php", sBaseURL)
show_motd(id, gRankURL, "")
return PLUGIN_HANDLED
}
if(containi(args, "/rank")!=-1) { // SAY /stats
new name[32]
get_user_name(id, name, 31)
new gRankURL[256]
format(gRankURL, 255,"%sindex.php?page=index&sort=skill&order=desc&search=%s", sBaseURL, name)
show_motd(id, gRankURL, "")
return PLUGIN_HANDLED
}
if(containi(args, "/search")!=-1) { // SAY /search processing trailing argument
new t1[32]
new t2[32]
parse(args,t1,32,t2,32)
new gRankURL[256]
format(gRankURL, 255,"%sindex.php?page=index&sort=skill&order=desc&search=%s", sBaseURL, t2)
show_motd(id, gRankURL, "")
return PLUGIN_HANDLED
}
if (containi(args, "/topclan")!=-1) { //SAY /topclan
new gRankURL[256]
format(gRankURL, 255,"%sclanlist.php", sBaseURL)
show_motd(id, gRankURL, "")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
} |
|