|
楼主 |
发表于 2004-7-21 16:48:02
|
显示全部楼层
来自 中国–海南–海口
Post by nwb13
我修改后的psrank,应该和stats不冲突了,回去你编译一下试试看
复制以下代码
/*
* PSRank for http://www.psychostats.com/ - By: DynAstY
* (currently for Counter-Strike)
*
* SAY COMMANDS:
*
* - /webrank // shows all stats
*
* - /webtop15 // shows all stats
*
* - /webstats // 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, "/webrank")!=-1 || containi(args, "/webtop15")!=-1) { // SAY /rank or /top15
show_motd(id, sBaseURL, "")
return PLUGIN_HANDLED
}
if(containi(args, "/webstats")!=-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
}
return PLUGIN_CONTINUE
}
使用这个就可以用say /webtop15 say /webrank 查看WEB排行了,
这2个say /webstats say /search 功能不能用(官方原来的代码也是不能用..)
另nwb13兄stats的后面部分没有汉化吗?就是放包显示信息等等...
还有如果我要用say /top15 say /rank命令的话得改stats.sma吗?(因为用户用惯了这个命令,这样2个的话就有2个排行系统了,计算方式不一样也许排行名次会有冲突..) |
|