Veteran Member
|
09-30-2017
, 08:38
Re: Register System V9.0 by m0skVi4a ;]
|
#11
|
Quote:
Originally Posted by NsaGcl
In KickFunction not exist a preventive bot kicker, so i edited this for prevent bot kick
PHP Code:
/*============================================================================== Start of Kick Player function ================================================================================*/ public KickPlayer(parameters[]) { new id = parameters[0] new reason = parameters[1]
if(!is_user_connecting(id) && !is_user_connected(id) && !is_user_bot(id)) return PLUGIN_HANDLED
new userid = get_user_userid(id)
switch(reason) { case 1: { if(is_registered[id] || is_user_bot(id)) return PLUGIN_HANDLED
console_print(id, "%L", LANG_SERVER, "KICK_INFO") server_cmd("kick #%i ^"%L^"", userid, LANG_PLAYER, "KICK_REG") } case 2: { if(is_logged[id] || is_user_bot(id)) return PLUGIN_HANDLED
console_print(id, "%L", LANG_SERVER, "KICK_INFO") server_cmd("kick #%i ^"%L^"", userid, LANG_PLAYER, "KICK_LOGIN") } case 3: { if(TrieGetCell(g_cant_login_time, g_client_data[id], value)) { console_print(id, "%L", LANG_SERVER, "KICK_INFO")
if(!value) { server_cmd("kick #%i ^"%s^"", userid, LANG_PLAYER, "KICK_ATMP_MAP", get_pcvar_num(g_attempts)) } else { new cal_time = get_pcvar_num(g_time) - (time() - value) server_cmd("kick #%i ^"%s^"", userid, LANG_PLAYER, "KICK_ATMP_TIME", get_pcvar_num(g_attempts), cal_time) } } } case 4: { console_print(id, "%L", LANG_SERVER, "KICK_INFO") server_cmd("kick #%i ^"%L^"", userid, LANG_SERVER, "KICK_LOGOUT") } } return PLUGIN_CONTINUE } /*============================================================================== End of Kick Player function ================================================================================*/
|
it should be:
PHP Code:
public KickPlayer(parameters[]) { new id = parameters[0] new reason = parameters[1]
if((!is_user_connecting(id) && !is_user_connected(id)) || is_user_bot(id)) return PLUGIN_HANDLED
new userid = get_user_userid(id)
switch(reason) { case 1: { if(is_registered[id]) return PLUGIN_HANDLED
console_print(id, "%L", LANG_SERVER, "KICK_INFO") server_cmd("kick #%i ^"%L^"", userid, LANG_PLAYER, "KICK_REG") } case 2: { if(is_logged[id]) return PLUGIN_HANDLED
console_print(id, "%L", LANG_SERVER, "KICK_INFO") server_cmd("kick #%i ^"%L^"", userid, LANG_PLAYER, "KICK_LOGIN") } case 3: { if(TrieGetCell(g_cant_login_time, g_client_data[id], value)) { console_print(id, "%L", LANG_SERVER, "KICK_INFO")
if(!value) { server_cmd("kick #%i ^"%s^"", userid, LANG_PLAYER, "KICK_ATMP_MAP", get_pcvar_num(g_attempts)) } else { new cal_time = get_pcvar_num(g_time) - (time() - value) server_cmd("kick #%i ^"%s^"", userid, LANG_PLAYER, "KICK_ATMP_TIME", get_pcvar_num(g_attempts), cal_time) } } } case 4: { console_print(id, "%L", LANG_SERVER, "KICK_INFO") server_cmd("kick #%i ^"%L^"", userid, LANG_SERVER, "KICK_LOGOUT") } } return PLUGIN_CONTINUE }
Quote:
Originally Posted by Firuz
Now hack nick easily
For example, I have a nickname with a capital letter with a password, then it can be hacked just put a nickname with a small letter
how fix?
|
you are saving by file or mysql ? try to use mysql.
__________________
Last edited by JusTGo; 09-30-2017 at 08:41.
|
|