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
================================================================================*/
__________________