|
发表于 2006-7-24 17:59:53
|
显示全部楼层
来自 中国–湖北–襄阳
回复: [求助]谁帮我写个插件
#include <amxmod>
public plugin_init()
{
register_plugin("KickIP", "0.0000001", "hohohoho~~~~")
}
public client_connect(id)
{
if(file_exists("addons/amx/ip.txt"))
{
new ip[32]
get_user_ip(id,ip,31,1)
new text[32]
new len = 0, line = 0
while(read_file("addons/amx/ip.txt",line++,text,31,len))
{
if(text[0]==';') continue
if(equal(ip, text))
{
return PLUGIN_CONTINUE
}
}
server_cmd("kick #%d You cannot connect to this server!", get_user_userid(id))
}
return PLUGIN_CONTINUE
} |
|