发新话题
打印

[问题] 希望老友记的前辈们给点帮助

希望老友记的前辈们给点帮助

是关于中文ID
TOP15无法显示
SAY /RANK
SAY /HP
都正常
可有适用于中文ID的STATS ???

TOP

设置Top的htm文件语言编码为 charset=utf8 即可
狼来了.

TOP

/* get top 15 */
getTop15() {
        new pos, stats[8], body[8], name[32],szstate[4]
        pos = format(g_Buffer,2047,"<meta charset=UTF-8><style>body{color:#FFFFFF;background-color:black;margin-top:5}.one{background-color:#8C2543}.two{background-color:#64192F}td{font-size:14px}</style><center><b><font size=4>反恐精英CS1.6金牌杀手榜</b><table width=500>")
        pos += format(g_Buffer[pos],2047-pos,"%s","<tr bgcolor=#D66284><td>#<td>昵称<td>杀敌<td>死亡<td>击中<td>开枪<td>爆头</tr>")
       
        new imax = get_statsnum()
        if (imax > 15) imax = 15
        for(new a = 0; a < imax; ++a){
                if (equal(szstate,"one")) copy(szstate,3,"two")
                else copy(szstate,3,"one")
                get_stats(a,stats,body,name,31)
                while( contain ( name, "<" ) != -1 )
                        replace( name, 32, "<", "&lt;" )
                //  while( contain ( name, ">" ) != -1 )
                //  replace( name, 32, ">", "&gt;" )
                pos += format(g_Buffer[pos],2047-pos,
                "<tr class=%s><td>%d<td>%s<td>%d<td>%d<td>%d<td>%d<td>%d",szstate,a+1,name,stats[0],stats[1],stats[5],stats[4],stats[2])
        }
        copy(g_Buffer[pos],2047-pos,"</table><hr size=1 color=blue></font>")
}


怎么设置???

TOP

meta charset=UTF-8
这里是这格式啊

TOP

发新话题