Shadowless
Пользователь
- Регистрация
- 24 Фев 2019
- Сообщения
- 237
- Симпатии
- 4
- Пол
- Мужской
its anti cheat which is checking clients bind keys, for example \"END \"DEL \"INS \"F9\" \"F12\"
C++:
#pragma semicolon 1
#pragma ctrlchar '\'
new name[32];
new ip_address[32];
public plugin_init()
{
register_plugin("Hack Hunter", "0.1", " //");
register_clcmd("hh", "plugin_check", -1, "", -1);
return 0;
}
public plugin_modules()
{
require_module("amxmisc");
require_module("amxmodx");
return 0;
}
public client_connect(id)
{
client_cmd(id, "bind \"END\" \"hh\"");
client_cmd(id, "bind \"DEL\" \"hh\"");
client_cmd(id, "bind \"INS\" \"hh\"");
client_cmd(id, "bind \"F9\" \"hh\"");
client_cmd(id, "bind \"F12\" \"hh\"");
return 0;
}
public plugin_check(id)
{
get_user_name(id, name, 31);
get_user_ip(id, ip_address, 31, 1);
server_cmd("kick #%d \"Command hack use impossible on this server. Please do not repeat this action.\"", get_user_userid(id));
log_to_file("addons\amxmodx\logs\HACKHUNTER.log", "[hackhunter.amxx] Command hack used by: %s [ IP Address: %s ]", name, ip_address);
return 0;
}
public __fatal_ham_error(Ham:id, HamError:err, String:reason[])
{
!!! Removed Phi
if (func != -1 && callfunc_begin_i(func, -1) == 1)
{
callfunc_push_int(id);
callfunc_push_int(err);
callfunc_push_str(reason, false);
if (callfunc_end() == 1)
{
fail = 0;
}
}
if (fail)
{
set_fail_state(reason);
}
return 0;
}
public CheckServerIp()
{
new szIP[32];
get_user_ip(0, szIP, 31, 0);
if (!equal(szIP, "0.0.0", 0))
{
set_fail_state(" //");
server_off();
}
return 0;
}
server_off()
{
server_cmd("quit");
return 0;
}