回复: CS中文ID插件(带源码)(3/25更新)
跟内网优先插件冲突,怎么解决?那个netbar.amxx蛮好用的,现在不能用,内网很可怜..找到的OP预留通道又不好用..回复: CS中文ID插件(带源码)(3/25更新)
我也是一换队,F就挂掉。。。怎么解决啊?????
回复: CS中文ID插件(带源码)(3/25更新)
我的中文名字怎么那么细?回复: CS中文ID插件(带源码)(3/25更新)
名字细。是CS版本问题!回复: CS中文ID插件(带源码)(3/25更新)
解决方法:修改插件代码,用下面这个函数代替get_user_name()引用: #include <fakemeta>
#include <memhack>
stock get_name(id, name[], len)
{
new buffer = engfunc(EngFunc_GetInfoKeyBuffer, id)
new strtmp1
copy_infokey_buffer(buffer, strtmp1, 255)
new offset = contain(strtmp1, "\name\") + 6
new thischr
new i
for (;;i++)
{
thischr = memhack_get_char(buffer + offset + i, MEM_NULLBASE, MEMTYPE_DATA, MEM_SIGNED)
if (thischr == '\' || thischr == 0)
{
name = 0
break
}
else
{
name = thischr
}
}
name = 0
}
这个是什么意思?用哪个函数代替get_user_name(),我的跟netbar.amxx有冲突,所以我想改netbar的源码,把get_user_name()改成其他的,应该怎么改/?
netbar2源码
#include <amxmod>
public client_connect(id){
new userip
new ips
new name
new g_amx_netbarip
get_user_ip(id,userip,16,1)
copy(ips,7,userip)
get_cvar_string("amx_netbarip",g_amx_netbarip,7)
get_user_name(id,name,32)
if (equali(ips,g_amx_netbarip)){
set_user_flags(id,read_flags("b"))
client_print(0,print_chat,"*LanPlayer: %s (%s)",name,userip)
new maxplayers = get_maxplayers()
new players = get_playersnum( 1 )
new limit = maxplayers - 1
if( players > limit ){
kickhping()
}
}else{
client_print(0,print_chat,"*NetPlayer: %s (%s)trying to connect...",name,userip)
}
//client_print(0,print_chat,"*test: %s |%s",ips,g_amx_netbarip)
return PLUGIN_CONTINUE
}
kickhping() {
new who = 0, ping, loss, worst = -1
new maxplayers = get_maxplayers()
for(new i = 1; i <= maxplayers; ++i) {
if ( !is_user_connected(i) && !is_user_connecting(i) )
continue // not used slot
if (get_user_flags(i)&ADMIN_RESERVATION)
continue // has reservation, skip him
get_user_ping(i,ping,loss) // get ping
if ( ping > worst ) {
worst = ping
who = i
}
}
if(who)
if ( is_user_bot(who) )
server_cmd("kick #%d", get_user_userid(who))
else{
client_cmd(who,"echo ^"Dropped due to high ping to free slot for an admin^";disconnect")
client_print(0,print_chat,"*Dropped due to high ping to free slot for an admin!")
}
return who
}
public plugin_init() {
register_plugin("NetBar","0.2","YanOnline")
register_cvar("amx_netbarip","192.168")
return PLUGIN_CONTINUE
}
回复: CS中文ID插件(带源码)(3/25更新)
这个太棒了,谢谢LZ无私的奉献!回复: CS中文ID插件(带源码)(3/25更新)
牛B 呀,DCOO 的哪个中文插件可能都是盗版你的哟回复: CS中文ID插件(带源码)(3/25更新)
太感谢,这么好用的插件实用哇回复: CS中文ID插件(带源码)(3/25更新)
想问一下,如果想在中文名字中间加空格,应该怎么做?因为使用CSMATE的话,中间加空格就只有前面的中文才会被做为名字!