[发布]BAN在一定时间内retry的玩家-没钱下载Or需要源码
完全复制党。。哈哈 反正看到他那个帖子的人说
源码是空的 骗子什么的
我就把源码给你们吧
下载
1
不知道论坛前面有没有发布这个插件
我把这个插件传上来供大家分享.
一些玩家经常死了就retry,比较讨厌.这个插件的作用就是在一定的时间内
如果重复retry这个命令次数达到限制就BAN掉,对有OP权限的无效.
插件安装方法和其他插件一样.
下面是amxx.cfg配置:
amx_retryban = 1 //是否启用插件
amx_retrybanduration = 3
amx_retrychat = 1
amx_retrytimetoban = 10 //规定的一段时间为10分钟
amx_retrycounttoban = 2 //在规定的一段时间内重复retry 2次后就被BAN掉
amx_retrybankmsg = "Ban %s %m min(s) because retry %d times in %m2 min(s)"
amx_retrychatmsg = "You were using command RETRY %d time(s) in %d minute(s) so you has been banned from this server in %d minutes. Come back later please!"
/* AMX Mod script.
*
* ========================Ban retry player Version 1.1============================
*
* (c) Copyright 2006, C@mp3R based on SYZo's AMX plugin
* This file is provided as is (no warranties).
*
*
*
* NEWS
* 11 Jan 2006
* - Add 2 new cvars
* amx_retrytimetoban
* amx_retrycounttoban : (if you retry "amx_retrycounttoban" times in "amx_retrytimetoban" minute(s), you will be banned)
* - Fixed ADMIN_IMMUNITY problem, now admin with access level a will not be banned
*
* 10 Jan 2006
* - Rename the plugin from no_reconnect to banretryplayer
* - Fixed the wrong spelling Embarassed
*
*
*
* amx_retryban = 1
* amx_retrybanduration = 3
* amx_retrychat = 1
*
* amx_retrytimetoban = 10
* amx_retrycounttoban = 2 (if you retry 3 times in amx_retrytimetoban minute(s), you will be banned)
*
* amx_retrybankmsg = "Ban %s %m min(s) because retry %d times in %m2 min(s)"
* amx_retrychatmsg = "You were using command RETRY %d time(s) in %d minute(s) so you has been banned from this server in %d minutes. Come back later please!"
*
*/
#include <amxmodx>
#include <amxmisc>
#define MAX_PLAYERS 32
new pip
new markedIp
public client_connect(id) {
if ((!is_user_bot(id)) && ( !(get_user_flags(id) & ADMIN_IMMUNITY) ) && (get_cvar_num("amx_retryban")==1)) {
new userip
new uname
get_user_ip(id, userip, 21, 0)
get_user_name(id, uname, 33)
for(new i = 1; i <= MAX_PLAYERS; i++) {
if (equal(userip, pip, 21)) {
new userid
userid = get_user_userid(id)
if ( !(get_user_flags(id) & ADMIN_IMMUNITY) ) {
//--------------------------------------------
if (markedIp < get_cvar_num("amx_retrycounttoban"))
{
return PLUGIN_CONTINUE
}
//--------------------------------------------
new txt
get_cvar_string("amx_retrybanmsg", txt, 127)
new min
new min2
new retryCount
num_to_str(get_cvar_num("amx_retrybanduration"),min, 5)
num_to_str(get_cvar_num("amx_retrytimetoban"),min2, 5)
num_to_str(get_cvar_num("amx_retrycounttoban"),retryCount, 2)
replace(txt, 127, "%s", uname)
replace(txt, 127, "%m", min)
replace(txt, 127, "%m2", min2)
replace(txt, 127, "%d", retryCount)
server_cmd("say %s",txt)
set_hudmessage(255, 0, 0, 0.05, 0.70, 0, 5.0, 6.0, 6.0, 0.15, 3)
show_hudmessage(0,"%s",txt)
if (get_cvar_num("amx_retrychat")==1)
{
new sTemp
new text
get_cvar_string("amx_retrychatmsg", sTemp, 127)
format(text, 128, sTemp, get_cvar_num("amx_retrycounttoban"), get_cvar_num("amx_retrytimetoban"), get_cvar_num("amx_retrybanduration"))
client_cmd(id,"echo %s",text)
}
server_cmd("addip %d ^"%s^";wait;writeip",get_cvar_num("amx_retrybanduration"),userip)
markedIp = 0
pip = 0
}
return PLUGIN_CONTINUE
}
}
}
return PLUGIN_CONTINUE
}
public client_disconnect(id) {
if ((!is_user_bot(id)) && ( !(get_user_flags(id) & ADMIN_IMMUNITY) ) && (get_cvar_num("amx_retryban")==1)) {
for(new i = 1; i <= MAX_PLAYERS; i++) {
if(pip == 0) {
markedIp++;
server_print("say ----Markip[%d] = %d----", i, markedIp)
//--------------------------------------------
if (markedIp == 1) // First time retry
{
new para
format(para, 2, "%d", i)
set_task(60.0 * get_cvar_num("amx_retrytimetoban"), "clean_markedip", 0, para, 1)
}
//----------------------------------
else if (markedIp == get_cvar_num("amx_retrycounttoban"))// Reached the retry time count
{
new userip
get_user_ip(id, userip, 21, 0)
copy(pip, 21, userip)
}
return PLUGIN_CONTINUE
}
}
}
return PLUGIN_CONTINUE
}
public clean_markedip(index[]) {
markedIp=0;
}
public plugin_init() {
register_plugin("Ban retry player","1.1","C@mp3r.vn")
register_cvar("amx_retryban","1")
register_cvar("amx_retrybanduration","3")
register_cvar("amx_retrychat","1")
register_cvar("amx_retrytimetoban","10")
register_cvar("amx_retrycounttoban","2")
// %s is the player name, %m is amx_retrybanduration in minutes
register_cvar("amx_retrybanmsg","Ban %s %m min(s) because retry %d time(s) in %m2 min(s)")
register_cvar("amx_retrychatmsg","You were using command RETRY %d time(s) in %d minute(s) so you has been banned from this server in %d minutes. Come back later please!")
for(new i=0; i< MAX_PLAYERS; i++)
{
markedIp=0;
}
return PLUGIN_CONTINUE
} 用了! 没效果啊! 阁下还没完全改好,你应该汉化下~~ 有能够限制OP VIP的吗??
OP VIP 老是进出进出的 普通玩家还好
页:
[1]