gracz gra > reconnect > dostaje kicka i info że nie może wejść przez X sec > drugi reconnect > i gra normalnie , więc proszę o przerobienie żeby
banował na 5 min z powodem Reconnect
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Napisano 13.12.2009 13:00
Napisano 13.12.2009 19:28
/* AMX Mod X script. * * No reconnect * (c) Copyright 2002, SYZo * This file is provided as is (no warranties). * * amx_minreconnecttime 20 (in seconds) * * ******************************************************************************* * * Ported By KingPin( [email protected] ). I take no responsibility * for this file in any way. Use at your own risk. No warranties of any kind. * * ******************************************************************************* * Updated Feb 14 2006 * */ #include <amxmodx> #include <engine> #define MAX_PLAYERS 32 #define PLUGIN "No reconnect" #define VERSION "2.11" #define AUTHOR "SYZo" new pip[MAX_PLAYERS][22] new Float:minreconnecttime public delayed_kick(user[]) { new name[32] get_user_name(user[0], name, 31) server_cmd("amx_ban ^"5^" ^"%s^" ^"Reconnect^"", name); } public clean_blackip(ind[]) { pip[ind[0]][0] = 0 } public client_connect(id) { if (!is_user_bot(id)) { minreconnecttime = get_cvar_float("amx_minreconnecttime") new userip[21+1] new uname[33+1] 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[i], 21)) { new userid[1] userid[0] = get_user_userid(id) new authid[32] get_user_authid(id,authid,32) log_amx("^"%s<%s><%d><%s><>^"", uname, userip, get_user_userid(id), authid) if (!(get_user_flags(id)&ADMIN_IMMUNITY)) { new text[128] format(text, 128, "Player %s kicked after usage reconnect command", uname) set_hudmessage(255, 0, 0, 0.05, 0.70, 0, 5.0, 6.0, 6.0, 0.15, 3) show_hudmessage(0,"%s",text) client_cmd(id,"echo [AMXX] You used command RECONNECT within %f, please reconnect after %f sec", minreconnecttime) set_task(1.0,"delayed_kick",0,userid,1) } return PLUGIN_CONTINUE } } } return PLUGIN_CONTINUE } public client_disconnect(id) { if (!is_user_bot(id)) { for(new i = 1; i <= MAX_PLAYERS; i++) { if(pip[i][0] == 0) { new userip[21+1] get_user_ip(id, userip, 21, 0) copy(pip[i], 21, userip) new userid[1] userid[0] = i set_task(minreconnecttime, "clean_blackip", 0, userid[0], 1) return PLUGIN_CONTINUE } } } return PLUGIN_CONTINUE } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_cvar("amx_minreconnecttime","20") return PLUGIN_CONTINUE }
Napisano 13.12.2009 21:07
L 12/13/2009 - 21:08:35: [no_reconnect.amxx] "ZuO<10.100.0.6:27005><20><STEAM_ID_LAN><>" L 12/13/2009 - 21:08:35: String formatted incorrectly - parameter 4 (total 3) L 12/13/2009 - 21:08:35: [AMXX] Displaying debug trace (plugin "no_reconnect.amxx") L 12/13/2009 - 21:08:35: [AMXX] Run time error 25: parameter error L 12/13/2009 - 21:08:35: [AMXX] [0] no_reconnect.sma::client_connect (line 61)
Napisano 13.12.2009 21:11
/* AMX Mod X script. * * No reconnect * (c) Copyright 2002, SYZo * This file is provided as is (no warranties). * * amx_minreconnecttime 20 (in seconds) * * ******************************************************************************* * * Ported By KingPin( [email protected] ). I take no responsibility * for this file in any way. Use at your own risk. No warranties of any kind. * * ******************************************************************************* * Updated Feb 14 2006 * */ #include <amxmodx> #include <engine> #define MAX_PLAYERS 32 #define PLUGIN "No reconnect" #define VERSION "2.11" #define AUTHOR "SYZo" new pip[MAX_PLAYERS][22] new Float:minreconnecttime public delayed_kick(user[]) { new name[32] get_user_name(user[0], name, 31) server_cmd("amx_ban ^"5^" ^"%s^" ^"Reconnect^"", name); } public clean_blackip(ind[]) { pip[ind[0]][0] = 0 } public client_connect(id) { if (!is_user_bot(id)) { minreconnecttime = get_cvar_float("amx_minreconnecttime") new userip[21+1] new uname[33+1] 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[i], 21)) { new userid[1] userid[0] = get_user_userid(id) new authid[32] get_user_authid(id,authid,32) log_amx("^"%s<%s><%d><%s><>^"", uname, userip, get_user_userid(id), authid) if (!(get_user_flags(id)&ADMIN_IMMUNITY)) { set_task(1.0,"delayed_kick",0,userid,1) } return PLUGIN_CONTINUE } } } return PLUGIN_CONTINUE } public client_disconnect(id) { if (!is_user_bot(id)) { for(new i = 1; i <= MAX_PLAYERS; i++) { if(pip[i][0] == 0) { new userip[21+1] get_user_ip(id, userip, 21, 0) copy(pip[i], 21, userip) new userid[1] userid[0] = i set_task(minreconnecttime, "clean_blackip", 0, userid[0], 1) return PLUGIN_CONTINUE } } } return PLUGIN_CONTINUE } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_cvar("amx_minreconnecttime","20") return PLUGIN_CONTINUE }
Napisano 13.12.2009 21:33
L 12/13/2009 - 21:33:21: [AMXX] Displaying debug trace (plugin "no_reconnect.amxx") L 12/13/2009 - 21:33:21: [AMXX] Run time error 4: index out of bounds L 12/13/2009 - 21:33:21: [AMXX] [0] no_reconnect.sma::client_connect (line 50)
0 użytkowników, 0 gości, 0 anonimowych