Witamy w Nieoficjalnym polskim support'cie AMX Mod X
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.
|
Problem z pluginem "noreconnect"
#1
Napisano 27.09.2008 09:45
Mianowicie wszystko działa ok, ale w logach widać błąd:
L 09/27/2008 - 10:26:19: [AMXX] Run time error 4 (plugin "no_reconnect.amxx") - debug not enabled!
L 09/27/2008 - 10:26:19: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Może wie ktoś jaka jest tego przyczyna? Albo ma jakiś sprawdzony plugin na zablokowanie reconnecta, super by było jak by można było jeszcze immunitet ustawić
Z góry dzięki za pomoc
#2 Gość__*
Napisano 27.09.2008 11:05
no_reconnect.amxx debug
Dodaj flagęuper by było jak by można było jeszcze immunitet ustawić
aDo users.ini ;-)
#3
Napisano 27.09.2008 12:18
L 09/27/2008 - 13:10:49: [AMXX] Displaying debug trace (plugin "no_reconnect.amxx")
L 09/27/2008 - 13:10:49: [AMXX] Run time error 4: index out of bounds
L 09/27/2008 - 13:10:49: [AMXX] [0] no_reconnect.sma::client_connect (line 46)
a co do flagi to chociaż mam to i tak immunitetu nie mam
co dalej? jak pozbyć się tego błędu?
#4
Napisano 27.09.2008 12:22
#5
Napisano 27.09.2008 12:28
/* AMX Mod X script.
*
* No reconnect
* © 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[]) {
server_cmd("kick #%d",user[0])
}
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, "Noob %s zostal kickniety za uzycie reconnectu", 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 [INFO] Uzyles komendy RECONNECT = zlamales regulamin = kick", 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
}
#6
Napisano 01.10.2008 08:36
#7
Napisano 01.10.2008 09:35
a jest jakiś inny plugin który uniemożliwia reconnect? bo z tego co szukałem to wszędzie jest tylko ten
#8
Napisano 01.10.2008 10:16
/* 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[33][22] new Float:minreconnecttime public delayed_kick(user[]) { server_cmd("kick #%d",user[0]) } public clean_blackip(ind[]) { pip[ind[0]][0] = 0 } public client_putinserver(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 <= get_maxplayers(); 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_KICK)) { 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 %.0f sec, please reconnect after %.0f sec", minreconnecttime, 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 <= get_maxplayers(); 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","30") return PLUGIN_CONTINUE }
#9
Napisano 02.10.2008 11:08
to jeszcze tak przy okazji jedna sprawa a właściwie dwie:
1) dałoby się żeby immunitet był na inną flagę niż A?
2) dałoby się żeby zamiast wiadomości w konsoli wyświetlała się ona jakoś w podobie REASON przy banie?
#10
Napisano 02.10.2008 13:29
ale można zmienić.if (!(get_user_flags(id)&ADMIN_KICK)) {
(2) zamiast której wiadomości, tej ?
Jej nie da się zmienić bo kick jest przed wejściem do gry.client_cmd(id,"echo [AMXX] You used command RECONNECT within %.0f sec, please reconnect after %.0f sec", minreconnecttime, minreconnecttime)
#11
Napisano 02.10.2008 14:25
#12
Napisano 02.10.2008 14:31
[ Dodano: 02-10-2008, 16:03 ]
Immunitet na flagę "b"
Powód nie w consoli a w okienku od kick'a
/* 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[33][22] new Float:minreconnecttime public clean_blackip(ind[]) { pip[ind[0]][0] = 0 } public client_putinserver(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 <= get_maxplayers(); i++) { if (equal(userip, pip[i], 21)) { 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_RESERVATION)) { 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) new reason[128] format(reason,127,"You used command RECONNECT within %.0f sec, please reconnect after %.0f sec", minreconnecttime, minreconnecttime) server_cmd("kick #%d ^"%s^"", get_user_userid(id) , reason) } return PLUGIN_CONTINUE } } } return PLUGIN_CONTINUE } public client_disconnect(id) { if (!is_user_bot(id)) { for(new i = 1; i <= get_maxplayers(); 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","30") return PLUGIN_CONTINUE }
#13
Napisano 03.10.2008 01:02
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych