Скриптер
Проверенный
Пользователь
- Сообщения
- 3,593
- Реакции
- 1,576
- Помог
- 141 раз(а)
#include <amxmodx>
#include <amxmisc>
#include <reapi>
new const Plugin_sName[] = "Unreal HPPv6 Detector";
new const Plugin_sVersion[] = "1.0.6";
new const Plugin_sAuthor[] = "Karaulov";
new g_sCvarName[] = "host_limitlocal";
new g_sCvarName2[] = "sv_lan_rate";
new const g_sVerBackup[MAX_PLAYERS + 1][64];
public plugin_init()
{
register_plugin(Plugin_sName, Plugin_sVersion, Plugin_sAuthor);
register_cvar("unreal_hppv6_detect", Plugin_sVersion, FCVAR_SERVER | FCVAR_SPONLY);
}
public client_putinserver(id)
{
if (REU_GetProtocol(id) >= 48)
{
query_client_cvar(id, g_sCvarName, "check_host_limitlocal_is_zero");
}
}
public client_disconnected(id)
{
remove_task(id);
}
public check_host_limitlocal_is_zero(id, const cvar[], const value[])
{
if(equali(cvar,g_sCvarName) && equali(value,"1") && is_user_connected(id))
{
client_cmd(id, "%s 0",g_sCvarName);
client_cmd(id, "%s 0;%s 0;",g_sCvarName,g_sCvarName);
client_cmd(id, "%s 0",g_sCvarName);
set_task(1.5,"check_host_limitlocal_is_zero_task",id)
}
}
public check_host_limitlocal_is_zero_task(id)
{
query_client_cvar(id, g_sCvarName, "check_host_limitlocal_is_zero2");
}
public check_host_limitlocal_is_zero2(id, const cvar[], const value[])
{
if(equali(cvar,g_sCvarName) && equali(value,"1") && is_user_connected(id))
{
new username[33];
get_user_name(id,username,charsmax(username));
query_client_cvar(id, g_sCvarName2, "check_protector");
}
}
public check_protector(id, const cvar[], const value[])
{
if(equali(cvar,g_sCvarName2) && is_user_connected(id))
{
copy(g_sVerBackup[id],charsmax(g_sVerBackup[]),value);
client_cmd(id, "%s 93133",g_sCvarName2);
client_cmd(id, "%s 93133;%s 93133;",g_sCvarName2,g_sCvarName2);
client_cmd(id, "%s 93133",g_sCvarName2);
set_task(1.5,"check_protector_task",id)
}
}
public check_protector_task(id)
{
query_client_cvar(id, g_sCvarName2, "check_protector2");
}
public check_protector2(id, const cvar[], const value[])
{
if(equali(cvar,g_sCvarName2) && equali(value,"93133"))
{
client_cmd(id, "%s %s",g_sCvarName2,g_sVerBackup[id]);
new username[33];
get_user_name(id,username,charsmax(username));
client_print_color(0,print_team_red, "^4[HPP DETECTOR]^3: Игрок^1 %s^3 использует ^1HPP HACK^3!",username);
log_amx("[HPP DETECTOR]: Игрок %s использует HPP HACK!",username);
//server_cmd("amx_ban 1000 #%d ^"HPP DETECTED^"", get_user_userid(id)); // Раскомментируйте строку для бана!
}
else if(equali(cvar,g_sCvarName2))
{
client_cmd(id, "%s %s",g_sCvarName2,g_sVerBackup[id]);
new username[33];
get_user_name(id,username,charsmax(username));
client_print_color(0,print_team_red, "^4[HPP DETECTOR]^3: Игрок^1 %s^3 возможно использует ^1HPP HACK^3!",username);
log_amx("[HPP DETECTOR]: Игрок %s возможно использует HPP HACK!",username);
//server_cmd("amx_ban 1000 #%d ^"HPP DETECTED^"", get_user_userid(id));// Раскомментируйте строку для бана!
}
}