|
发表于 2005-2-21 17:34:35
|
显示全部楼层
来自 中国–浙江–温州–平阳县
public show_msg(ids[2]){
new name[32],id,pos
id=ids[0]
if (get_cvar_num("amx_hideop")){
if (get_user_flags(id)&ADMIN_IMMUNITY) {
get_user_name(id,name,31)
pos += format(g_buffer[pos],511-pos," %s ",name)
pos += format(g_buffer[pos],511-pos,"进入服务器,他来自:,")
pos += format(g_buffer[pos],511-pos," 身份OP,地址隐藏,")
pos += format(g_buffer[pos],511-pos," 祝您玩的愉快!")
while(replace(g_buffer, 511, ",", "^n")){}
set_hudmessage(0, 255, 0, 0.05, 0.50, 2, 0.01, 8.0, 0.01, 3.0, 4)
show_hudmessage(0, g_buffer)
}
else{
get_user_name(id,name,31)
pos += format(g_buffer[pos],511-pos," %s ",name)
pos += format(g_buffer[pos],511-pos,"进入服务器,他来自:,")
pos += format(g_buffer[pos],511-pos,"%s%s,",g_country[id],g_city[id])
pos += format(g_buffer[pos],511-pos," 祝您玩的愉快,请不要作弊!")
while(replace(g_buffer, 511, ",", "^n")){}
set_hudmessage(0, 255, 0, 0.05, 0.50, 2, 0.01, 8.0, 0.01, 3.0, 4)
show_hudmessage(0, g_buffer)
}
}
else{
get_user_name(id,name,31)
pos += format(g_buffer[pos],511-pos," %s ",name)
pos += format(g_buffer[pos],511-pos,"进入服务器,他来自:,")
pos += format(g_buffer[pos],511-pos,"%s%s,",g_country[id],g_city[id])
pos += format(g_buffer[pos],511-pos," 祝您玩的愉快,请不要作弊!")
// client_print(0,print_chat,"[hnroc]: %s",g_buffer)
while(replace(g_buffer, 511, ",", "^n")){}
set_hudmessage(0, 255, 0, 0.05, 0.50, 2, 0.01, 8.0, 0.01, 3.0, 4)
// set_hudmessage(0, 255, 0, 0.05, 0.45, 0, 6.0, 10.0, 0.5, 0.15, 4)
show_hudmessage(0, g_buffer)
}
return PLUGIN_CONTINUE
}
public cmdcity(id){
new players[32],inum
new iLen = 0
get_players(players,inum)
iLen = format( sBuffer,2047, "<body bgcolor=#000000><font color=#FFB000><pre>" )
iLen += format( sBuffer[iLen],2047-iLen,"%2s %15s %22s^n"," 玩家ID"," 玩家IP"," 所在城市")
for( new i = 0; i < inum && 2047-iLen > 0; i++ ) {
new ip[32],name[32]
if(get_cvar_num("amx_hideop")){
if (get_user_flags(players)&ADMIN_IMMUNITY) {
get_user_name(players,name,31)
iLen += format(sBuffer[iLen],2047-iLen,"%1s %13s %21s^n",name,"*****","*****","*****")
}
else{
get_user_name(players,name,31)
get_user_ip(players,ip,31,1)
iLen += format(sBuffer[iLen],2047-iLen,"%1s %s %s%s^n",name,ip,g_country[players],g_city[players])
}
}
else{
get_user_name(players,name,31)
get_user_ip(players,ip,31,1)
iLen += format(sBuffer[iLen],2047-iLen,"%1s %s %s%s^n",name,ip,g_country[players],g_city[players])
}
}
show_motd(id, sBuffer, "Look City" )
return PLUGIN_HANDLED
}
找到mysql.cfg,打开在其里修改为:
amx_mysql_host "127.0.0.1"
amx_mysql_user "root"
amx_mysql_pass "123456"
amx_mysql_db "amx"
amx_hideop "1"
其中root为用户名,123456为你设置的密码,amx为创建的数据库并非表(mytable) |
|