Анти-стрейф

bake2

Пользователь
Регистрация
3 Окт 2019
Сообщения
169
Симпатии
4
OS
Linux
Amx Mod X
AMXX 1.9.0
Билд
Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) ReHLDS version: 3.11.0.767-dev Build date: 03:13:55 Oct 25 2021 (2753)
ReGamedll
ReGameDLL version: 5.21.0.546-dev Build date: 15:32:48 Dec 28 2021
Metamod
Metamod-r v1.3.0.128, API (5:13) Metamod-r build: 17:47:54 Aug 24 2018
Meta модули
Код:
[ 1] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 5] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 7] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 8] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl1 ANY Never
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[10] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[11] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[12] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl1 ANY Never
Плагины
Код:
[ 1] AntiIdleBot 2.0.0 mx?! antiindlebot.am running
[ 2] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 3] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 4] Combo On Kill 0.2 Vaqtincha combo_on_kill.a running
[ 5] FreshBans 1.4.5b kanagava fresh_bans.amxx running
[ 6] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 7] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 8] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 9] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 10] Players Menu 1.7 neugomon plmenu.amxx running
[ 11] Maps Menu 1.4.2 neugomon & Hisok mapsmenu3.amxx running
[ 12] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 13] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 14] Instant AutoTeamBalanc 1.2.0 ConnorMcLeod autoteambalance running
[ 15] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 16] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 17] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 18] Restrict Weapons 1.9.0.5271 AMXX Dev Team restmenu.amxx running
[ 19] StatsX 1.9.0.5271 AMXX Dev Team statsx.amxx running
[ 20] Reklama 20.05.2020 mx?! reklama.amxx running
[ 21] Advanced Kill Assists 1.2d Xelson next21_kill_ass running
[ 22] VoteGag 1.0 sNk votegag.amxx running
[ 23] [190] SlayLosers RBS 20.06.06 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 24] Mode 2x2 2.5re s1lent mode.amxx running
[ 25] Mute Menu 1.1.0 szawesome mute_menu.amxx running
[ 26] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 27] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 28] Ping Faker 1.5a MeRcyLeZZ pingfaker.amxx running
[ 29] [ReAPI] Best player of 1.1.2 F@nt0M best_player_of_ running
[ 30] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 31] GameName Changer 1.0 neugomon gamename_change running
[ 32] C4 Timer 1.1 SAMURAI & Remod: c4_timer.amxx running
[ 33] [190] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 34] [190] First Players Re 20.06.06 SKAJIbnEJIb FirstPlayersRes running
[ 35] Top Awards 0.11c Safety1st top_awards4.amx running
[ 36] ResetScore 1.0 MakapoH. ResetScoreAuto. running
[ 37] Time for info 1.0 neugomon time_for_info.a running
[ 38] Weapon Icon 1.2 hoboman313/Zenix weapon_icon.amx running
[ 40] AES: Status Info 0.1 serfreeman1337 aes_status_info running
[ 41] AES: StatsX Info Rank 0.1 serfreeman1337 aes_statsx_rank running
[ 42] Center Msg Fix 0.4 mx?! CenterMsgFix.am running
[ 43] Knife WarnUP 1.0 ill knife_warm-up.a running
[ 44] Refill Weapon On Kill 0.0.1a Vaqtincha refill_weapon_o running
[ 45] Smoke: HealthNade 0.0.3 wopox1337 Smoke_HealthNad running
[ 46] AdminsOnline 1.0 ZETA [M|E|N] AdminsOnline.am running
[ 47] Advanced Ultimate Weap 0.1.0b steelzzz auw.amxx running
[ 48] [ReAPI] Auto Menu 0.1.644 CG automenu1.amxx running
[ 49] Night VIPs 1.1.1 szawesome night_vips.amxx running
[ 50] VoteMap After Round Li 1.0 neygomon votemap_after_w running
[ 51] Simple Damager 2.1.0 fl0wer simple_damager. running
[ 52] Demo Recorder 2.4.1 F@nt0M demo_recorder.a running
[ 53] [182] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 54] NO_FITH_TEXT 1.1w perf No_fith_text.am running
[ 55] BlockReconnectRespawn 1.4-kill Sylwester brr_kill.amxx running
[ 56] Win Messages & Sounds 2.2 OciXCrom crx_winmessages running
[ 57] [ReAPI:AMXX] Buy Nades 0.0.3a steelzorrr amxx_buy_nades_ running
[ 58] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash3. running
[ 59] SF Bets 0.1.5 serfreeman1337 sf_bets.amxx running
[ 60] Spect Bot 1.2 SKAJIbnEJIb & Bo SpectBot.amxx running
[ 61] Bomb pickup on use 1.0.1 voed use_bomb_pickup running
[ 62] Flash Bug Fix 1.2.0 F@nt0M/biba flash_fix.amxx running
[ 63] [190] Snipers RBS 20.06.06 SKAJIbnEJIb snipers_rbs.amx running
[ 64] Give HP 1.0 neygomon | 9art vampire.amxx running
[ 65] Restart Round Cmd 1.5 KaLo admin_restart.a running
[ 66] Anti Fast Strafe 10.1 Proffi+Seroff fast_strafe_det running
[ 67] Map List Generator 1.3 Leo_[BH] mapslist_genera running
[ 68] Admin Respawn [by RoGu 3.0 RoGuE adm_respawn.amx running
[ 69] Map Manager: Core 3.0.10 Mistrick map_manager_cor running
[ 70] Map Manager: Scheduler 0.1.7 Mistrick map_manager_sch running
[ 71] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 72] Map Manager: Nominatio 0.1.3 Mistrick map_manager_nom running
[ 73] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 74] Map Manager: Online so 0.0.3 Mistrick map_manager_onl running
[ 75] Map Manager: Effects 0.0.10 Mistrick map_manager_eff running
[ 76] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 77] Map Manager: Priority 0.0.1 Mistrick map_manager_pri running
[ 78] Map Manager: Advanced 0.0.7 Mistrick map_manager_adv running
[ 79] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 80] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 81] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 82] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 83] ChatAdditions: Core v1.7.3 Sergey Shorokhov ChatAdditions_C running
[ 84] ChatAdditions: SQLite v1.7.3 Sergey Shorokhov CA_Storage_SQLi running
[ 85] CA: Gag v1.7.3 Sergey Shorokhov CA_Gag.amxx running
Amxx Модули
Код:
ReAimDetector 0.2.2 ReHLDS Team running
MySQL 1.9.0.5271 AMX Mod X Dev Team running
SQLite 1.9.0.5271 AMX Mod X Dev Team running
Fun 1.9.0.5271 AMX Mod X Dev Team running
Engine 1.9.0.5271 AMX Mod X Dev Team running
FakeMeta 1.9.0.5271 AMX Mod X Dev Team running
nVault 1.9.0.5271 AMX Mod X Dev Team running
CStrike 1.9.0.5271 AMX Mod X Dev Team running
CSX 1.9.0.5271 AMX Mod X Dev Team running
Ham Sandwich 1.9.0.5271 AMX Mod X Dev Team running
ReAPI 5.21.0.252 Asmodai & s1lent running
Sockets 1.9.0.5271 AMX Mod X Dev Team running
RegEx 1.9.0.5271 AMX Mod X Dev Team running
Sockets2 1.8.1.3746 HLSW Dev Team running
Ошибка
Код:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>

new cvarMax_Strafe,Float:FTimeJump[33],Float:FLastJumps[33],StrafeNum[33];

public plugin_init()
{
register_plugin("Anti Fast Strafe","10.1","Proffi+Seroff");
cvarMax_Strafe = register_cvar("Max_Strafe", "3");
register_forward(FM_CmdStart, "Player_CmdStart");
RegisterHam(Ham_Player_Jump, "player", "Player_Jump",1);
}

public Player_Jump(id)
{
if(is_user_alive(id))
{
if(FTimeJump[id] >= get_gametime()) return HAM_IGNORED;
FTimeJump[id] = get_gametime() + 1.0; // После истечение 1 сек можно стрейфит не нажимая джамп, это тоже проблема.
}
return HAM_IGNORED;
}

public Player_CmdStart(id, uc_handle)
{
if(get_cvar_num("Max_Strafe") && is_user_alive(id))
{
if(FTimeJump[id] <= get_gametime()){
return FMRES_IGNORED;
}
else
{
if(pev(id,pev_flags) & (FL_ONGROUND | FL_FLY | FL_FROZEN)) StrafeNum[id] = 0;
static Float:Gametime;Gametime = get_gametime();
if(Gametime > (FLastJumps[id] + 0.3))
{
StrafeNum[id] = 0;
FLastJumps[id] = Gametime;
}
}
if(pev(id,pev_flags) & (FL_ONGROUND | FL_FLY | FL_FROZEN)) StrafeNum[id] = 0;
if(get_pdata_int(id, 247, 5) & (IN_MOVELEFT + поворот на лево 90°| IN_MOVERIGHT+ поворот направо на 90° | IN_FORWARD | IN_BACK) )
{
if( ++StrafeNum[id] >= get_pcvar_num(cvarMax_Strafe))
{
new Float:fVelocity[3]; pev(id, pev_velocity, fVelocity);
fVelocity[0] *= 0.2; fVelocity[1] *= 0.2;
set_pev(id, pev_velocity, fVelocity);
}
}
}
return FMRES_IGNORED;
}

public client_putinserver( id ) FTimeJump[id] = 0.0;
Нужны советы по антистрейфу. Может ловит такое условие? Если игрок (в воздухе нажмет на лево и повернет налево на 90° в течении 0.3 сек) то будет 1 детект, аналогична и вправо, при 2 детекте застопим игрока, при истечении 0.3 сек детект сбросится. Код в спойлере.
 

bake2

Пользователь
Регистрация
3 Окт 2019
Сообщения
169
Симпатии
4
углы+нажатие.:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

new Float:FTimeJump[33],Float:FLastJumps[33];

#define PLUGIN "StrafeHack Detector"
#define VERSION "0.1"
#define AUTHOR "Mistrick"

#pragma semicolon 1

const PITCH = 0;
const YAW = 1;

const LEFT = 1;
const RIGHT = 2;



enum _:PLAYER_DATA
{
 m_BadFrame,
 m_Strafes,
 m_WarningStrafeAngle,
 Float:m_fLastStrafeCheck,
 Float:m_fLastWeaponDeploy
};
enum _:PLAYER_DATA
{
 m_BadFrame,
 m_Strafes,
 m_WarningStrafeAngle,
 Float:m_fLastStrafeCheck,
 Float:m_fLastWeaponDeploy
};
new g_ePlayerInfo[33][PLAYER_DATA];

new g_ePlayerLog[33][LOG_DATA];


new Float:g_fOldAngles[33][3];
new g_iOldTurning[33];
new Float:g_fOldStrafeAngles[33][3];
new Float:g_fOldAnglesDiff[33];

public plugin_init()
{
 register_plugin(PLUGIN, VERSION, AUTHOR);
 RegisterHam(Ham_Player_Jump, "player", "Player_Jump",1);
 register_forward(FM_CmdStart, "FM_CmdStart_Pre", false);
 register_forward(FM_PlayerPreThink, "FM_PlayerPreThink_Pre", false);


 for(new iId = CSW_P228, szWeaponName[32]; iId <= CSW_P90; iId++)
 {
  if(get_weaponname(iId, szWeaponName, charsmax(szWeaponName)))
  {
   RegisterHam(Ham_Item_Deploy, szWeaponName, "Ham_Item_Deploy_Pre", false);
  }
 }
}
public Player_Jump(id)
{
 if(is_user_alive(id))                                 
 {
  if(FTimeJump[id] >= get_gametime()) return HAM_IGNORED;
  FTimeJump[id] = get_gametime() + 1.0; // 1.0
 }
 return HAM_IGNORED;
}


public Ham_Item_Deploy_Pre(weapon)
{
 new id = get_pdata_cbase(weapon, m_pPlayer, XO_CBASEPLAYERWEAPON);
 g_ePlayerInfo[id][m_fLastWeaponDeploy] = _:get_gametime();
}
public FM_CmdStart_Pre(id, uc_handle, seed)
{
 if(!is_user_alive(id)) return FMRES_IGNORED;
  if(FTimeJump[id] <= get_gametime())
  {
    return FMRES_IGNORED;
  }
 if(pev(id,pev_flags) & (FL_ONGROUND | FL_FLY | FL_FROZEN))
 {
return FMRES_IGNORED;
 }
 new Float:fForwardMove; get_uc(uc_handle, UC_ForwardMove, fForwardMove);
 new Float:fSideMove; get_uc(uc_handle, UC_SideMove, fSideMove);

 
static Float:Gametime;Gametime = get_gametime();
if(Gametime < (FLastJumps[id] + 0.3))
{
if(get_pdata_int(id, 247, 5) & (IN_MOVELEFT + leftstrafe(true) | IN_MOVERIGHT+ rightstrafe(true)) )
  {                                                                         
        new Float:fVelocity[3]; pev(id, pev_velocity, fVelocity);
        fVelocity[0] *= 0.2; fVelocity[1] *= 0.2;     
        set_pev(id, pev_velocity, fVelocity);     
  }
}
 if(fForwardMove == 0.0 && fSideMove == 0.0) return FMRES_IGNORED;
 
 new Float:fTime = get_gametime();
 
 if(fTime < g_ePlayerInfo[id][m_fLastWeaponDeploy] + IGNORE_TIME) return FMRES_IGNORED;
 
 new bButtons = get_uc(uc_handle, UC_Buttons);
 
 new Float:fAngles[3]; pev(id, pev_angles, fAngles);
 new Float:fAnglesDiff[3]; vec_diff(fAnglesDiff, fAngles, g_fOldAngles[id]);
 
 new Float:fValue = floatsqroot(fForwardMove * fForwardMove + fSideMove * fSideMove);
 
 // block scripts with +right, +left
 if(bButtons & (IN_LEFT | IN_RIGHT))
 {
new Float:fVelocity[3]; pev(id, pev_velocity, fVelocity);
  fVelocity[0] *= 0.2; fVelocity[1] *= 0.2;
  set_pev(id, pev_velocity, fVelocity)
 }
 
 fForwardMove = floatabs(fForwardMove);
 fSideMove = floatabs(fSideMove);
 
 new iTurning = 0;
new Float:fDiff = fAngles[YAW] - g_fOldAngles[id][YAW];
 
new leftstrafe=false
new rightstrafe= false
 
 if(fDiff >= 180.0) fDiff -= 360.0;
 if(fDiff < -180.0) fDiff += 360.0;
 
 
 if(fDiff < 0.0)
 {
  iTurning = RIGHT;
  if(g_iOldTurning[id] == LEFT)
  {
   rightstrafe= true
   StrafeForward(id, fAngles);
  }
 }
 else if(fDiff > 0.0)
 {
  iTurning = LEFT;
  if(g_iOldTurning[id] == RIGHT)
  {
   leftstrafe=true
   StrafeForward(id, fAngles);
  }
}

 g_iOldTurning[id] = iTurning;
 
 g_fOldAngles[id] = fAngles;
}
 return FMRES_IGNORED;
}

public FM_PlayerPreThink_Pre(id)
{
{
 if(!is_user_alive(id)) return FMRES_IGNORED;
 }
StrafeForward(id, Float:angles[3])
{
 new Float:fAnglesDiff[3]; vec_diff(fAnglesDiff, angles, g_fOldStrafeAngles[id]);
 
 if(fAnglesDiff[YAW] >= 180) fAnglesDiff[YAW] -= 360.0;
 if(fAnglesDiff[YAW] < -180) fAnglesDiff[YAW] += 360.0;
 
 fAnglesDiff[YAW] = floatabs(fAnglesDiff[YAW]);
 
 //console_print(id, "strafe angle diff %f, old angle diff %f, turning [%d]", fAnglesDiff[YAW], g_fOldAnglesDiff[id], turning);
 
 if(fAnglesDiff[YAW] < MAX_ANGLE_CHECK)
 {
  new Float:fDiff = floatabs(fAnglesDiff[YAW] - g_fOldAnglesDiff[id]);
  new iOldWarn = g_ePlayerInfo[id][m_WarningStrafeAngle];
 
  if( fDiff < 0.1 )
  {
   g_ePlayerInfo[id][m_WarningStrafeAngle] += 5;
  }
  else if( fDiff < MIN_STRAFE_ANGLE_DIFF )
  {
   g_ePlayerInfo[id][m_WarningStrafeAngle]++;
  }
  else if(g_ePlayerInfo[id][m_WarningStrafeAngle])
  {
   g_ePlayerInfo[id][m_WarningStrafeAngle]--;
  }
 
new Float:fTime = get_gametime();

 
 g_fOldAnglesDiff[id] = fAnglesDiff[YAW];
 g_fOldStrafeAngles[id] = angles;

}
vec_diff(Float:vec[3], Float:new_vec[3], Float:old_vec[3])
{
 vec[0] = new_vec[0] - old_vec[0];
 vec[1] = new_vec[1] - old_vec[1];
 vec[2] = new_vec[2] - old_vec[2];
}
equal_null(Float:vec[3])
{
 return (vec[0] == 0.0 && vec[1] == 0.0) ? true : false;
}

public client_putinserver( id ) FTimeJump[id] = 0.0;
 
Сверху Снизу