Участник
Пользователь
- Сообщения
- 172
- Реакции
- 33
- Предупреждения
- 5
- Помог
- 3 раз(а)
Всем привет, я когда то натыкался на плагин, который в логи записывает какие команды в консоль пишут игроки, помогите найти пожалуйста такой
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>
#define Day 99
#define Month 99
#define Year 9999
const TASKID_CHECK = 1337;
new const ScriptListName[] = "Script_Prefixes.ini";
new const CheatListName[] = "Cheat_Prefixes.ini";
/*#define m_afButtonPressed 246
#define m_afButtonReleased 247*/
new g_CheckCvar[][] =
{
"gl_vsync","fps_max","fps_modem","fps_override","cl_sidespeed","sv_cheats","cl_pitchspeed",
"cl_forwardspeed","cl_backspeed","cl_yawspeed","developer","cl_filterstuffcmd"
};
new g_DefaultCvar[][] =
{
"gl_vsync 0","fps_max 99.5","fps_modem 0","fps_override 0","cl_sidespeed 400",
"cl_forwardspeed 400","cl_backspeed 400","cl_yawspeed 210","developer 0","cl_pitchspeed 225"
};
new g_DefaultCmd[][] =
{
"fullupdate","lastinv","menuselect","vban","specmode","VModEnable","specmode","spec_set_ad",
"vmodenable","cl_setautobuy","cl_setrebuy","byu","buyequip","weapon_knife","weapon_flashbang",
"weapon_smokegrenade","buyammo1","buyammo2","showbriefing"
};
new TotalCvars;
new bool:isBanned[33];
new Trie:BadCommands;
new Array:CheatCommands;
new Float:OldAngles[33][3];
new Float:FLastCmd[33],Float:fForwardMove[33],Float:fSideMove[33];
new WarMove[33],WarHLGuard[33],WarAngles[33],WarFps[33];
new UserFPS[33],Steps[33],NamesChangesNum[33],BadCommandsFile[1024],CheatCommandsFile[1024];
public plugin_init()
{
register_plugin("Anti-Cheat","15","Proffi");
register_cvar("Ban_Type", "1");
register_cvar("Max_Fps", "111");
register_cvar("Check_Cheat", "1");
register_cvar("Check_Helper", "1");
register_cvar("Check_Strafe", "1");
register_cvar("Check_HLGuard", "1");
register_cvar("Check_Fps", "1");
register_cvar("Check_Bhop", "1");
register_cvar("Check_Bhop_New", "1");
register_cvar("Check_Space", "1");
register_cvar("Check_Gstrafe", "1");
register_cvar("Check_Cvars", "1");
register_cvar("Check_Bad_Cmd", "1");
register_cvar("Check_ID_LAN", "1");
register_cvar("Fix_Bug_Nick", "1");
register_cvar("Min_Name_Length", "3");
register_cvar("Fast_Name_Change", "1");
register_cvar("Show_Console_Info", "1");
BadCommands = TrieCreate();
CheatCommands = ArrayCreate(32, 1);
register_forward(FM_CmdStart, "Player_CmdStart");
register_forward(FM_PlayerPreThink, "Player_PreThink");
register_forward(FM_PlayerPostThink, "Player_PostThink");
RegisterHam(Ham_Spawn, "player", "Player_Spawn",1);
RegisterHam(Ham_Killed, "player", "Player_Spawn",1);
set_task(5.0, "Check_Cvar",0,"",0,"b");
static Time[32],Time_Day[32],Time_Month[32],Time_Year[32];
get_time("%d/%m/%Y",Time,31); get_time("%d",Time_Day,31); get_time("%m",Time_Month,31); get_time("%Y",Time_Year,31);
server_print("Anti-Cheat Activate To [%d/%d/%d] Real Data [%s]",Day,Month,Year,Time);
}
public plugin_cfg()
{
static File[64];
get_configsdir(File, 63);
format(File, 63, "%s/Anti_Cheat.cfg", File);
if(file_exists(File)) server_cmd("exec %s", File); server_exec();
get_configsdir(BadCommandsFile, 1023);
formatex(BadCommandsFile, 1023, "%s/%s", BadCommandsFile, ScriptListName);
if(file_exists(BadCommandsFile))
{
new iFilePointer = fopen( BadCommandsFile, "r");
if(iFilePointer != 0)
{
new szData[128];
while(fgets(iFilePointer, szData, 127))
{
replace(szData, 127, "^n", "");
replace(szData, 127, "^t", "");
remove_quotes(szData);
trim(szData);
strtolower(szData);
TrieSetCell(BadCommands, szData, 1);
}
fclose(iFilePointer);
}
}
get_configsdir(CheatCommandsFile, 1023);
formatex(CheatCommandsFile, 1023, "%s/%s", CheatCommandsFile, CheatListName);
if(file_exists(CheatCommandsFile))
{
new iFilePointer = fopen(CheatCommandsFile, "r");
if(iFilePointer != 0)
{
new szData[128];
while(fgets(iFilePointer, szData, 127))
{
replace(szData, 127, "^n", "");
replace(szData, 127, "^t", "");
replace(szData, 127, "^r", "");
remove_quotes(szData);
trim(szData);
ArrayPushString(CheatCommands, szData);
}
fclose(iFilePointer);
TotalCvars = ArraySize(CheatCommands);
}
}
return PLUGIN_CONTINUE;
}
public client_connect(id) {for(new i = 0; i < sizeof(g_DefaultCvar); i++) console_cmd(id,"%s",g_DefaultCvar);}
public client_putinserver(id)
{
static NewName[32],szAuthid[32];
get_user_authid(id,szAuthid,charsmax(szAuthid));
get_user_info(id,"name",NewName,charsmax(NewName));
if(get_cvar_num("Fix_Bug_Nick") && (NewName[0] == '+' || NewName[0] == '#'))
set_user_info(id,"name",NewName[1]);
else if(strlen(NewName) < get_cvar_num("Min_Name_Length"))
server_cmd("kick #%d ^"Ваш Ник Слишком Короткий!^"",get_user_userid(id));
if(get_cvar_num("Check_ID_LAN") && equali(szAuthid,"STEAM_ID_LAN")
|| equali(szAuthid,"VALVE_ID_LAN") || equali(szAuthid,"HLTV"))
server_cmd("kick #%d ^"%s Запрещен!^"",get_user_userid(id),szAuthid);
isBanned[id] = false;
Steps[id] = 0;
WarMove[id] = 0;
WarAngles[id] = 0;
WarHLGuard[id] = 0;
NamesChangesNum[id] = 0;
if(get_cvar_num("Check_HLGuard")) set_task(3.0, "Check_Protector", id);
if(get_cvar_num("Check_Cheat")) set_task(5.0, "Check_Cheat",id,"",0,"b");
}
public client_disconnect(id)
{
isBanned[id] = false;
WarMove[id] = 0;
WarAngles[id] = 0;
WarHLGuard[id] = 0;
NamesChangesNum[id] = 0;
if(task_exists(id)) remove_task(id);
}
public Player_Spawn(id)
{
WarMove[id] = 0;
WarAngles[id] = 0;
WarHLGuard[id] = 0;
//if(get_cvar_num("Check_HLGuard") && is_user_alive(id)) Check_Protector(id);
return HAM_IGNORED;
}
public Check_Protector(id)
{
if(is_user_connected(id) || !is_user_bot(id) || !is_user_hltv(id))
{
set_task(1.0, "CheckButton", id);
console_cmd(id,"+jump;+moveright;+moveleft;+forward;+back");
}
}
public Check_Cvar()
{
if(get_cvar_num("Check_Cvars"))
{
static players[32],num,id;
get_players(players, num, "h");
for(new i = 0; i < num; i++)
{
id = players;
for(new i = 0; i < sizeof(g_CheckCvar); i++)
query_client_cvar(id,g_CheckCvar,"Cvars");
}
}
}
public Check_Cheat(id)
{
if(is_user_connected(id))
{
new first = 30 * Steps[id], last = first + 30;
if(last >= TotalCvars)
{
last = TotalCvars;
remove_task(id);
}
new szString[128];
for(new i = first; i < last; i++)
{
ArrayGetString(CheatCommands, i, szString, 127);
formatex(szString, 127, "%s", szString);
query_client_cvar(id, szString, "kzh");
}
Steps[id]++;
}
}
public kzh(id, const Cvar[], const Value[])
{
if(is_user_connected(id) && Value[0] != 'B' && !isBanned[id])
{
new szName[32],szIP[32];
get_user_name(id, szName, charsmax(szName));
get_user_ip(id, szIP, charsmax(szIP));
user_kill(id,1);
isBanned[id] = true;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"Cheat Commands [%s] Detected^"",get_user_userid(id),Cvar);
case 1: server_cmd("amx_ban 0 %s ^"Cheat Commands [%s] Detected^"",szIP,Cvar);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^4Hack Commands ^1[^4%s^1]",szName,Cvar);
}
return PLUGIN_HANDLED;
}
public Player_CmdStart(id, uc_handle)
{
if(get_cvar_num("Check_Fps") && is_user_alive(id))
UserFPS[id] = floatround(1/(get_uc(uc_handle, UC_Msec) * 0.001));
if(get_cvar_num("Check_Helper") && is_user_alive(id))
{
get_uc(uc_handle, UC_SideMove, fSideMove[id]);
get_uc(uc_handle, UC_ForwardMove, fForwardMove[id]);
}
if(get_cvar_num("Check_Strafe") && is_user_alive(id) && !isBanned[id])
{
if(!(pev(id,pev_movetype) == MOVETYPE_FLY)
&& !(pev(id,pev_flags) & (FL_ONGROUND | FL_FLY | FL_FROZEN)))
{
if(get_pdata_int(id, 247, 5) & (IN_LEFT | IN_RIGHT)) WarAngles[id] = 0;
if(get_pdata_int(id, 247, 5) & (IN_MOVELEFT | IN_MOVERIGHT | IN_FORWARD | IN_BACK))
{
static Float:Angles[3]; pev(id,pev_angles,Angles);
/*if((floatabs(Angles[0] - OldAngles[id][0]) == 0.0
|| Angles[0] == OldAngles[id][0]) && Angles[1] != OldAngles[id][1])*/
if(floatabs(Angles[1] - OldAngles[id][1]) >= 5
&& floatabs(Angles[0] - OldAngles[id][0]) == 0.0)
{
if(++WarAngles[id] >= 3)
{
WarAngles[id] = 0;
static Float:Speed[3];
pev(id, pev_velocity, Speed);
Speed[0] *= 0.3; Speed[1] *= 0.3;
set_pev(id, pev_velocity, Speed);
/*static szName[32],players[32],pnum;
get_user_name(id, szName, charsmax(szName));
get_players(players, pnum, "ch");
for(new i = 0; i < pnum; i++)
{
if(get_user_flags(players) & ADMIN_BAN)
{
ColorChat(players,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует [^4Fake Strafe^1]",szName);
}
}*/
}
}
else WarAngles[id] = 0;
OldAngles[id] = Angles;
}
else return FMRES_IGNORED;
}
else WarAngles[id] = 0;
}
/*if(get_cvar_num("Check_Strafe") && is_user_alive(id) && !isBanned[id])
{
static Float:Speed[3];
pev(id,pev_velocity,Speed);
if(!(pev(id,pev_movetype) == MOVETYPE_FLY)
&& !(pev(id,pev_flags) & (FL_ONGROUND | FL_FLY | FL_FROZEN))
&& !(floatround(vector_length(Speed), floatround_floor) > 555))
{
if(pev(id, pev_button) & IN_LEFT
|| pev(id, pev_button) & IN_RIGHT)
{
WarAngles[id] = 0;
Speed[0] *= 0.3; Speed[1] *= 0.3;
set_pev(id, pev_velocity, Speed);
}
if(get_pdata_int(id, 247, 5) & (IN_MOVELEFT | IN_MOVERIGHT | IN_FORWARD | IN_BACK))
{
static Float:Angles[3]; pev(id,pev_angles,Angles);
if(Angles[0] == OldAngles[id][0] && Angles[1] != OldAngles[id][1])
{
if(get_pdata_int(id, 247, 5) & (IN_MOVELEFT | IN_MOVERIGHT | IN_FORWARD | IN_BACK))
{
static Float:Angles[3]; pev(id,pev_angles,Angles);
if(Angles[0] == WarOldAngles[id][0] && Angles[1] != WarOldAngles[id][1])
{
console_cmd(id,"+mlook");
if(++WarAngles[id] >= 5)
{
new szName[32],szIP[32];
get_user_name(id, szName, charsmax(szName));
get_user_ip(id, szIP, charsmax(szIP));
user_kill(id,1);
WarAngles[id] = 0;
isBanned[id] = true;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"Fake Strafe Detected^"",get_user_userid(id));
case 1: server_cmd("amx_ban 0 %s ^"Fake Strafe Detected^"",szIP);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует [^4Fake Strafe^1]",szName);
}
}
else WarAngles[id] = 0;
WarOldAngles[id] = OldAngles[id];
}
else return FMRES_IGNORED;
}
else WarAngles[id] = 0;
OldAngles[id] = Angles;
}
else return FMRES_IGNORED;
}
else WarAngles[id] = 0;
}*/
return FMRES_IGNORED;
}
public Player_PostThink(id)
{
if(get_cvar_num("Check_Fps") && is_user_alive(id) && !isBanned[id])
{
if(UserFPS[id] > get_cvar_num("Max_Fps")
|| UserFPS[id] <= 0 && !(pev(id,pev_flags) & FL_FROZEN))
{
if(++WarFps[id] >= 3)
{
static szName[32],szIP[32];
get_user_name(id, szName, charsmax(szName));
get_user_ip(id, szIP, charsmax(szIP));
WarFps[id] = 0;
user_kill(id,1);
isBanned[id] = true;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"%d FPS Detected^"",get_user_userid(id),UserFPS[id])
case 1: server_cmd("amx_ban 10080 %s ^"%d FPS Detected^"",szIP,UserFPS[id]);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4%d FPS^1]",szName,UserFPS[id]);
}
}
else WarFps[id] = 0;
}
if(get_cvar_num("Check_Helper") && is_user_alive(id) && !isBanned[id])
{
new Float:fSpeed[3]; pev(id, pev_velocity, fSpeed); fSpeed[2] = 0.0;
new Float:fValue = floatsqroot(fForwardMove[id] * fForwardMove[id] + fSideMove[id] * fSideMove[id]);
if(vector_length(fSpeed) > 270.0 && fValue > 270.0)
{
pev(id, pev_velocity, fSpeed);
fSpeed[0] *= 0.3; fSpeed[1] *= 0.3;
set_pev(id, pev_velocity, fSpeed);
if(++WarMove[id] >= 16)
{
new szName[32],szIP[32];
get_user_name(id, szName, charsmax(szName));
get_user_ip(id, szIP, charsmax(szIP));
user_kill(id,1);
WarMove[id] = 0;
isBanned[id] = true;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"Strafe Helper Detected^"",get_user_userid(id));
case 1: server_cmd("amx_ban 0 %s ^"Strafe Helper Detected^"",szIP);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4Strafe Helper^1]",szName);
}
}
}
}
public Player_PreThink(id)
{
if(get_cvar_num("Check_Gstrafe") && is_user_alive(id) && !isBanned[id])
{
static Buttons;Buttons = pev(id, pev_button);
static OldButtons;OldButtons = pev(id, pev_oldbuttons);
static OldDuckCount[33],OldJumpCount[33],OldGroundFrame[33];
static WarDuck[33],DuckCount[33],JumpCount[33],GroundFrame[33];
static Float:Speed[3];pev(id,pev_velocity,Speed); Speed[2] = 0.0;
if(Buttons & IN_JUMP && !(OldButtons & IN_JUMP)) JumpCount[id]++;
if(Buttons & IN_DUCK && !(OldButtons & IN_DUCK)) DuckCount[id]++;
if(pev(id, pev_flags) & FL_ONGROUND) GroundFrame[id]++;
else if(DuckCount[id] && GroundFrame[id]
&& !IsUserSurfing(id) && vector_length(Speed) > 250.0)
{
if(DuckCount[id] && GroundFrame[id] && JumpCount[id] == OldJumpCount[id]
&& DuckCount[id] == OldDuckCount[id] && GroundFrame[id] == OldGroundFrame[id])
{
if(++WarDuck[id] >= 9)
{
new szName[32],szIP[32];
get_user_name(id,szName,charsmax(szName));
get_user_ip(id,szIP,charsmax(szIP));
user_kill(id,1);
WarDuck[id] = 0;
isBanned[id] = true;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"Gstrafe Hack Detected^"",get_user_userid(id));
case 1: server_cmd("amx_ban 0 %s ^"Gstrafe Hack Detected^"",szIP);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4Gstrafe Hack^1]",szName);
}
}
else WarDuck[id] = 0;
OldJumpCount[id] = JumpCount[id];
OldDuckCount[id] = DuckCount[id];
OldGroundFrame[id] = GroundFrame[id];
DuckCount[id] = 0; JumpCount[id] = 0; GroundFrame[id] = 0;
}
if(!DuckCount[id] && !GroundFrame[id] && IsUserSurfing(id) || vector_length(Speed) <= 250.0) WarDuck[id] = 0;
}
if(get_cvar_num("Check_Bhop_New") && is_user_alive(id) && !isBanned[id])
{
static Buttons;Buttons = pev(id, pev_button);
static OldButtons;OldButtons = pev(id, pev_oldbuttons);
static WarBhop[33],JumpCount[33],GroundFrame[33],DuckCount[33];
static Float:Speed[3];pev(id,pev_velocity,Speed); Speed[2] = 0.0;
if(Buttons & IN_JUMP && !(OldButtons & IN_JUMP)) JumpCount[id]++;
if(Buttons & IN_DUCK && !(OldButtons & IN_DUCK)) DuckCount[id]++;
if(pev(id, pev_flags) & FL_ONGROUND) GroundFrame[id]++;
else if(JumpCount[id] && GroundFrame[id]
&& !IsUserSurfing(id) && vector_length(Speed) > 150.0)
{
static Float:LastJump[33];
if(get_gametime() - LastJump[id] <= 0.5
|| get_gametime() - LastJump[id] >= 10.0) WarBhop[id] = 0;
else
{
if(JumpCount[id] && GroundFrame[id]
&& (JumpCount[id] <= 3 || JumpCount[id] >= 12)
&& (GroundFrame[id] >= 1 && GroundFrame[id] <= 3) && DuckCount[id] <= 1)
{
if(++WarBhop[id] >= 9)
{
new szName[32],szIP[32];
get_user_name(id,szName,charsmax(szName));
get_user_ip(id,szIP,charsmax(szIP));
user_kill(id,1);
WarBhop[id] = 0;
isBanned[id] = true;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"Auto Bhop Detected^"",get_user_userid(id));
case 1: server_cmd("amx_ban 0 %s ^"Auto Bhop Detected^"",szIP);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4Auto Bhop^1]",szName);
}
}
else WarBhop[id] = 0;
}
LastJump[id] = get_gametime();
JumpCount[id] = 0; DuckCount[id] = 0; GroundFrame[id] = 0;
}
if(!JumpCount[id] && !GroundFrame[id] || IsUserSurfing(id) || vector_length(Speed) < 150.0) WarBhop[id] = 0;
}
if(get_cvar_num("Check_Bhop") && is_user_alive(id) && !isBanned[id])
{
static Flags;Flags = pev(id, pev_flags);
static Button;Button = pev(id, pev_button);
static OldButtons;OldButtons = pev(id, pev_oldbuttons);
static GoodJumps[33],PerfectJumps[33],OldFlags[33],LastJump[33];
if(!(OldFlags[id] & FL_ONGROUND) && Flags & FL_ONGROUND
&& Button & IN_JUMP && !(OldButtons & IN_JUMP) && LastJump[id] >= 3)
{
static szName[32],szIP[32];
get_user_name(id, szName, charsmax(szName));
get_user_ip(id, szIP, charsmax(szIP));
if(++GoodJumps[id] >= 3)
{
GoodJumps[id] = 0;
if(++PerfectJumps[id] >= 5)
{
user_kill(id,1);
isBanned[id] = true;
PerfectJumps[id] = 0;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"Perfect Jumps Detected^"",get_user_userid(id));
case 1: server_cmd("amx_ban 0 %s ^"Perfect Jumps Detected^"",szIP);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует [^4Perfect Jumps^1]",szName);
}
}
}
else if(OldFlags[id] & FL_ONGROUND && Flags & FL_ONGROUND) GoodJumps[id] = 0;
if(OldButtons & IN_JUMP && !(Button & IN_JUMP)) LastJump[id] = 1;
else if(!(OldButtons & IN_JUMP) && !(Button & IN_JUMP)) LastJump[id]++;
OldFlags[id] = Flags;
}
if(get_cvar_num("Check_Space") && is_user_alive(id) && !isBanned[id])
{
new szName[32],szIP[32];
get_user_name(id, szName, charsmax(szName));
get_user_ip(id, szIP, charsmax(szIP));
static FrameCounter[33],WarSpace[33],GroundFrame[33];
static Buttons;Buttons = pev(id, pev_button);
static OldButtons;OldButtons = pev(id, pev_oldbuttons);
if(pev(id, pev_flags) & FL_ONGROUND) GroundFrame[id]++;
else if(GroundFrame[id])
{
static Float:LastJump[33];
if(get_gametime() - LastJump[id] <= 0.3) WarSpace[id] = 0;
LastJump[id] = get_gametime();
GroundFrame[id] = 0;
}
if(OldButtons & IN_JUMP && !(Buttons & IN_JUMP)) FrameCounter[id] = 0;
else if(Buttons & IN_JUMP && !(OldButtons & IN_JUMP) && 1 <= FrameCounter[id] && FrameCounter[id] <= 5)
{
if(++WarSpace[id] >= 66)
{
user_kill(id,1);
WarSpace[id] = 0;
isBanned[id] = true;
server_cmd("amx_ban 10080 %s ^"Holding Space Detected^"",szIP);
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4Holding Space^1]",szName);
}
}
if(FrameCounter[id] >= 6) WarSpace[id] = 0;
FrameCounter[id]++;
}
return FMRES_IGNORED;
}
public CheckButton(id)
{
if(is_user_connected(id))
{
new button = pev(id, pev_button);
if(~button & IN_FORWARD
|| ~button & IN_JUMP || ~button & IN_BACK
|| ~button & IN_MOVELEFT || ~button & IN_MOVERIGHT)
{
new szName[32];get_user_name(id, szName, charsmax(szName));
server_cmd("kick #%d ^"HL Guard Detected^"",get_user_userid(id));
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4HL Guard^1]",szName);
}
console_cmd(id,"-jump;-moveright;-moveleft;-forward;-back");
}
}
public Cvars(id,const szVar[],const szValue[])
{
if(is_user_connected(id) && !isBanned[id])
{
new szName[32],szIP[32];
get_user_name(id, szName, charsmax(szName));
get_user_ip(id, szIP, charsmax(szIP));
if(equal(szVar, "cl_forwardspeed") && str_to_float(szValue) != 400
|| equal(szVar, "cl_sidespeed") && str_to_float(szValue) != 400
|| equal(szVar, "cl_backspeed") && str_to_float(szValue) != 400
|| equal(szVar, "cl_yawspeed") && str_to_float(szValue) != 210
|| equal(szVar, "cl_pitchspeed") && str_to_float(szValue) != 225
|| equal(szVar, "developer") && str_to_float(szValue) != 0)
{
user_kill(id,1);
isBanned[id] = true;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"%s %s Detected^"",get_user_userid(id),szVar,szValue);
case 1: server_cmd("amx_ban 10080 %s ^"%s %s Detected^"",szIP,szVar,szValue);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4%s %s^1]",szName,szVar,szValue);
}
if(equal(szVar, "cl_filterstuffcmd") && str_to_float(szValue) != 0
|| equal(szVar, "fps_override") && str_to_float(szValue) != 0
|| equal(szVar, "fps_modem") && str_to_float(szValue) != 0
|| equal(szVar, "sv_cheats") && str_to_float(szValue) != 0
|| equal(szVar, "gl_vsync") && str_to_float(szValue) != 0)
{
server_cmd("kick #%d ^"Пожалуйста Пропишите В Консоль %s 0^"", get_user_userid(id),szVar)
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4%s %s^1]",szName,szVar,szValue);
}
if(equal(szVar, "fps_max") && (str_to_float(szValue) < 61 || str_to_float(szValue) > 101))
{
server_cmd("kick #%d ^"Пожалуйста Пропишите В Консоль %s 99.5^"", get_user_userid(id),szVar)
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4%s %s^1]",szName,szVar,szValue);
}
}
}
public client_infochanged(id)
{
new NewName[32],szName[32],szIP[32];
get_user_ip(id, szIP, charsmax(szIP));
get_user_name(id, szName, charsmax(szName));
get_user_info(id, "name",NewName,charsmax(NewName));
if(get_cvar_num("Fast_Name_Change") && is_user_connected(id) && !isBanned[id])
{
if(!equali(szName, NewName))
{
if(++NamesChangesNum[id] >= 3)
{
user_kill(id,1);
isBanned[id] = true;
NamesChangesNum[id] = 0;
switch(get_cvar_num("Ban_Type"))
{
case 0: server_cmd("kick #%d ^"Fast Name Change Detected^"",get_user_userid(id))
case 1: server_cmd("amx_ban 10080 %s ^"Fast Name Change Detected^"",szIP);
}
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^1[^4Fast Name Change^1]",szName);
}
static Float:Gametime;Gametime = get_gametime();
if(Gametime > (FLastCmd[id] + 5.0))
{
NamesChangesNum[id] = 0;
FLastCmd[id] = Gametime;
}
}
}
if(get_cvar_num("Fix_Bug_Nick") && (NewName[0] == '+' || NewName[0] == '#'))
set_user_info(id,"name",NewName[1]);
else if(strlen(NewName) < get_cvar_num("Min_Name_Length"))
server_cmd("kick #%d ^"Ваш Ник Слишком Короткий!^"",get_user_userid(id));
}
public client_command(id)
{
static Float:Last_Cmd[33];
if(Last_Cmd[id] == get_gametime())
{
Last_Cmd[id] = get_gametime();
return PLUGIN_HANDLED;
}
Last_Cmd[id] = get_gametime();
static sArgv[64],sArgv1[64];
read_argv(0, sArgv, 63);
read_args(sArgv1, charsmax(sArgv1));
remove_quotes(sArgv); trim(sArgv);
new szName[32],szIP[32],players[32],pnum;
get_players(players, pnum, "ch");
get_user_ip(id, szIP, charsmax(szIP));
get_user_name(id, szName, charsmax(szName));
if(get_cvar_num("Check_Bad_Cmd") && is_user_connected(id) && !isBanned[id])
{
if(strlen(sArgv) == 0) return PLUGIN_HANDLED;
else if(TrieKeyExists(BadCommands, sArgv))
{
user_kill(id,1);
isBanned[id] = true;
server_cmd("amx_ban 10080 %s ^"Bad Commands [%s] Detected^"",szIP,sArgv);
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^4Bad Commands ^1[^4%s^1]",szName,sArgv); return PLUGIN_HANDLED;
}
}
if(get_cvar_num("Show_Console_Info") && is_user_connected(id))
{
for(new i = 0; i < sizeof(g_DefaultCmd); i++)
{
if(equal(g_DefaultCmd,sArgv))
{
return PLUGIN_CONTINUE;
}
}
static Float:FLastMsg[33],Float:Gametime;Gametime = get_gametime();
if(Gametime > (FLastMsg[id] + 1.5))
{
for(new i = 0; i < pnum; i++)
{
if(get_user_flags(players) & ADMIN_BAN)
{
ColorChat(players,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Прописал В Консоль ^1[^4%s %s^1]",szName,sArgv,sArgv1);
}
}
FLastMsg[id] = Gametime;
}
}
return PLUGIN_CONTINUE;
}
IsUserSurfing(id)
{
if(is_user_alive(id))
{
new Flags;Flags = pev(id, pev_flags);
if(Flags & FL_ONGROUND) return 0;
new Float:origin[3], Float:dest[3];
pev(id, pev_origin, origin)
dest[0] = origin[0];
dest[1] = origin[1];
dest[2] = origin[2] - 1.0;
new ptr = create_tr2();
engfunc(EngFunc_TraceHull, origin, dest, 0, Flags & FL_DUCKING ? HULL_HEAD : HULL_HUMAN, id, ptr);
new Float:flFraction;
get_tr2(ptr, TR_flFraction, flFraction);
if(flFraction >= 1.0)
{
free_tr2(ptr);
return 0;
}
get_tr2(ptr, TR_vecPlaneNormal, dest);
free_tr2(ptr);
return dest[2] <= 0.7;
}
return 0;
}
stock super_cmd(const id, const szCmd[])
{
message_begin(MSG_ONE, SVC_DIRECTOR, _, id)
write_byte(strlen(szCmd) + 2)// command length in bytes
write_byte(10)
write_string(szCmd) // banner file
message_end()
}
[/SPOILER]
[SPOILER="а тут код"]
public client_command(id)
{
static Float:Last_Cmd[33];
if(Last_Cmd[id] == get_gametime())
{
Last_Cmd[id] = get_gametime();
return PLUGIN_HANDLED;
}
Last_Cmd[id] = get_gametime();
static sArgv[64],sArgv1[64];
read_argv(0, sArgv, 63);
read_args(sArgv1, charsmax(sArgv1));
remove_quotes(sArgv); trim(sArgv);
new szName[32],szIP[32],players[32],pnum;
get_players(players, pnum, "ch");
get_user_ip(id, szIP, charsmax(szIP));
get_user_name(id, szName, charsmax(szName));
if(get_cvar_num("Check_Bad_Cmd") && is_user_connected(id) && !isBanned[id])
{
if(strlen(sArgv) == 0) return PLUGIN_HANDLED;
else if(TrieKeyExists(BadCommands, sArgv))
{
user_kill(id,1);
isBanned[id] = true;
server_cmd("amx_ban 10080 %s ^"Bad Commands [%s] Detected^"",szIP,sArgv);
ColorChat(0,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Использует ^4Bad Commands ^1[^4%s^1]",szName,sArgv); return PLUGIN_HANDLED;
}
}
if(get_cvar_num("Show_Console_Info") && is_user_connected(id))
{
for(new i = 0; i < sizeof(g_DefaultCmd); i++)
{
if(equal(g_DefaultCmd,sArgv))
{
return PLUGIN_CONTINUE;
}
}
static Float:FLastMsg[33],Float:Gametime;Gametime = get_gametime();
if(Gametime > (FLastMsg[id] + 1.5))
{
for(new i = 0; i < pnum; i++)
{
if(get_user_flags(players) & ADMIN_BAN)
{
ColorChat(players,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Прописал В Консоль ^1[^4%s %s^1]",szName,sArgv,sArgv1);
}
}
FLastMsg[id] = Gametime;
}
}
return PLUGIN_CONTINUE;
}
IsUserSurfing(id)
{
if(is_user_alive(id))
{
new Flags;Flags = pev(id, pev_flags);
if(Flags & FL_ONGROUND) return 0;
new Float:origin[3], Float:dest[3];
pev(id, pev_origin, origin)
dest[0] = origin[0];
dest[1] = origin[1];
dest[2] = origin[2] - 1.0;
new ptr = create_tr2();
engfunc(EngFunc_TraceHull, origin, dest, 0, Flags & FL_DUCKING ? HULL_HEAD : HULL_HUMAN, id, ptr);
new Float:flFraction;
get_tr2(ptr, TR_flFraction, flFraction);
if(flFraction >= 1.0)
{
free_tr2(ptr);
return 0;
}
get_tr2(ptr, TR_vecPlaneNormal, dest);
free_tr2(ptr);
return dest[2] <= 0.7;
}
return 0;
}
public client_command(id) // - ловит команды клиента
if(get_user_flags(players) & ADMIN_BAN) // - проверка на флаг админ бан и вывод в колор чат команды клиента
{
ColorChat(players,NORMAL,"[^3Анти-Чит^1]Игрок ^4%s ^1Прописал В Консоль ^1[^4%s %s^1]",szName,sArgv,sArgv1);
}
new const g_omit[][] =
{
"VTC_CheckStart",
"vgui_runscript",
"VTC_CheckEnd",
"jointeam",
"VModEnable",
"specmode",
"joinclass",
//"weapon_knife",
"cl_setautobuy",
"cl_autobuy"
}
public client_command(id)
{
if(id < 1 || id > 32)
return PLUGIN_HANDLED
new getCmd[127]; read_argv(0, getCmd, charsmax(getCmd))
if(strlen(getCmd) > 0)
{
if(containi(getCmd, "weapon_") != -1)
{
return PLUGIN_CONTINUE
}
for(new i; i < sizeof g_omit; i++)
{
if(equali(getCmd, g_omit[i]))
{
return PLUGIN_CONTINUE
}
}
new nick[32]; get_user_name(id, nick, charsmax(nick))
//save->cstrike\addons\amxmodx\logs
log_to_file("getCmd.txt", "nick: %s cmd: %s", nick, getCmd)
}
return PLUGIN_CONTINUE
}