Вопрос Double tap

Начинающий
Статус
Оффлайн
Регистрация
29 Дек 2018
Сообщения
62
Реакции[?]
9
Поинты[?]
0
Скиньте пожалуйста код даблтапа за кое что(за спасибо)
 
zzz
Премиум
Статус
Оффлайн
Регистрация
25 Сен 2017
Сообщения
899
Реакции[?]
306
Поинты[?]
6K
GlobalVars.cpp:
int m_nTickbaseShift;
bool bInSendMove;
int32_t nSinceUse;
bool bFirstSendMovePack;
GlobalVars.h:
extern int m_nTickbaseShift;
extern bool bInSendMove;
extern int32_t nSinceUse;
extern bool bFirstSendMovePack;
CInput.h under m_pVerifiedCommands:
inline CUserCmd * GetUserCmd (int nSlot, int sequence_number);
CInput.h up to JoyAxis_t:

CUserCmd * CInput :: GetUserCmd (int nSlot, int sequence_number)
{
typedef CUserCmd * (__thiscall * GetUserCmd_t) (void *, int, int);
return Utils :: GetVFunc <GetUserCmd_t> (this, 8) (this, nSlot, sequence_number);
// return & m_pCommands [sequence_number% MULTIPLAYER_BACKUP];
}

Hooks.h under PaintTraverse_t:
typedef bool (__ thiscall * WriteUsercmdDeltaToBufferFn) (void *, int, void *, int, int, bool);

Hooks.h under LockCursor:
static bool __fastcall hkdWriteUsercmdDeltaToBuffer (void * ecx, void *, int slot, bf_write * buf, int from, int to, bool isnewcommand);

Hooks.cpp:

bool __fastcall Hooks :: hkdWriteUsercmdDeltaToBuffer (void * ecx, void *, int slot, bf_write * buf, int from, int to, bool isnewcommand)
{
static auto ofunct = g_Hooks.pClientHook-> GetOriginal <WriteUsercmdDeltaToBufferFn> (24);

if (Globals :: m_nTickbaseShift <= 0)
return ofunct (ecx, slot, buf, from, to, isnewcommand);

if (from! = -1)
return true;

auto CL_SendMove = [] () {
using CL_SendMove_t = void (__ fastcall *) (void);
static CL_SendMove_t CL_SendMoveF = (CL_SendMove_t) Utils :: FindSignature ("engine.dll", "55 8B EC A1 ???? 81 EC ???? B9 ???? 53 8B 98");

CL_SendMoveF ();
};
auto WriteUsercmd = [] (bf_write * buf, CUserCmd * in, CUserCmd * out) {
using WriteUsercmd_t = void (__ fastcall *) (bf_write *, CUserCmd *, CUserCmd *);
static WriteUsercmd_t WriteUsercmdF = (WriteUsercmd_t) Utils :: FindSignature ("client_panorama.dll", "55 8B EC 83 E4 F8 51 53 56 8B D9 8B 0D");
WriteUsercmdF (buf, in, out);

};
int * pNumBackupCommands = (int *) (reinterpret_cast <uintptr_t> (buf) - 0x30);
int * pNumNewCommands = (int *) (reinterpret_cast <uintptr_t> (buf) - 0x2C);
auto net_channel = * reinterpret_cast <NetChannel * *> (reinterpret_cast <uintptr_t> (g_pClientState) + 0x9C);
int32_t new_commands = * pNumNewCommands;

if (! Globals :: bInSendMove) {
if (new_commands <= 0)
return false;

Globals :: bInSendMove = true;
Globals :: bFirstSendMovePack = true;
Globals :: m_nTickbaseShift + = new_commands;

while (Globals :: m_nTickbaseShift> 0) {
CL_SendMove ();
Globals :: bFirstSendMovePack = false;
}

Globals :: bInSendMove = false;
return false;
}

if (! Globals :: bFirstSendMovePack) {
int32_t loss = min (Globals :: m_nTickbaseShift, 10);

Globals :: m_nTickbaseShift - = loss;
net_channel-> m_nOutSequenceNr + = loss;
}

int32_t next_cmdnr = g_pClientState-> m_nLastOutgoingCommand + g_pClientState-> m_nChokedCommands + 1;
int32_t total_new_commands = min (Globals :: m_nTickbaseShift, 62);
Globals :: m_nTickbaseShift - = total_new_commands;

from = -1;
* pNumNewCommands = total_new_commands;
* pNumBackupCommands = 0;

for (to = next_cmdnr - new_commands + 1; to <= next_cmdnr; to ++) {
if (! ofunct (ecx, slot, buf, from, to, isnewcommand))
return false;

from = to;
}

CUserCmd * last_realCmd = g_GameInput-> GetUserCmd (slot, from);
CUserCmd fromCmd;

if (last_realCmd)
fromCmd = * last_realCmd;

CUserCmd toCmd = fromCmd;
toCmd.command_number ++;
toCmd.tick_count + = 200;

for (int i = new_commands; i <= total_new_commands; i ++) {
WriteUsercmd (buf, & toCmd, & fromCmd);
fromCmd = toCmd;
toCmd.command_number ++;
toCmd.tick_count ++;
}

return true;

Hooks.cpp under FrameStageNotify hooking:
g_Hooks.pClientHook -> Hook (24, Hooks :: hkdWriteUsercmdDeltaToBuffer);
Hooks.cpp in Createmove:
if (c_config::get().doubletap && (Globals::pCmd->buttons & IN_ATTACK))
{
if (Globals::nSinceUse++ <3)
Globals::m_nTickbaseShift = TIME_TO_TICKS(2.0f);
}
else {
Globals::nSinceUse = 0;
}

}
 
Забаненный
Статус
Оффлайн
Регистрация
21 Авг 2019
Сообщения
1,461
Реакции[?]
502
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Dreammmless.
Эксперт
Статус
Оффлайн
Регистрация
19 Мар 2019
Сообщения
2,956
Реакции[?]
962
Поинты[?]
1K
да спс за дабл тап от которого дабл тап только звук. Это шонакс в сурсах давно еще оставлял бтв
там не только звук, там еще и визуально две пули вылетают (как и в ав в5)
 
Начинающий
Статус
Оффлайн
Регистрация
29 Дек 2018
Сообщения
62
Реакции[?]
9
Поинты[?]
0
GlobalVars.cpp:
int m_nTickbaseShift;
bool bInSendMove;
int32_t nSinceUse;
bool bFirstSendMovePack;
GlobalVars.h:
extern int m_nTickbaseShift;
extern bool bInSendMove;
extern int32_t nSinceUse;
extern bool bFirstSendMovePack;
CInput.h under m_pVerifiedCommands:
inline CUserCmd * GetUserCmd (int nSlot, int sequence_number);
CInput.h up to JoyAxis_t:

CUserCmd * CInput :: GetUserCmd (int nSlot, int sequence_number)
{
typedef CUserCmd * (__thiscall * GetUserCmd_t) (void *, int, int);
return Utils :: GetVFunc <GetUserCmd_t> (this, 8) (this, nSlot, sequence_number);
// return & m_pCommands [sequence_number% MULTIPLAYER_BACKUP];
}

Hooks.h under PaintTraverse_t:
typedef bool (__ thiscall * WriteUsercmdDeltaToBufferFn) (void *, int, void *, int, int, bool);

Hooks.h under LockCursor:
static bool __fastcall hkdWriteUsercmdDeltaToBuffer (void * ecx, void *, int slot, bf_write * buf, int from, int to, bool isnewcommand);

Hooks.cpp:

bool __fastcall Hooks :: hkdWriteUsercmdDeltaToBuffer (void * ecx, void *, int slot, bf_write * buf, int from, int to, bool isnewcommand)
{
static auto ofunct = g_Hooks.pClientHook-> GetOriginal <WriteUsercmdDeltaToBufferFn> (24);

if (Globals :: m_nTickbaseShift <= 0)
return ofunct (ecx, slot, buf, from, to, isnewcommand);

if (from! = -1)
return true;

auto CL_SendMove = [] () {
using CL_SendMove_t = void (__ fastcall *) (void);
static CL_SendMove_t CL_SendMoveF = (CL_SendMove_t) Utils :: FindSignature ("engine.dll", "55 8B EC A1 ???? 81 EC ???? B9 ???? 53 8B 98");

CL_SendMoveF ();
};
auto WriteUsercmd = [] (bf_write * buf, CUserCmd * in, CUserCmd * out) {
using WriteUsercmd_t = void (__ fastcall *) (bf_write *, CUserCmd *, CUserCmd *);
static WriteUsercmd_t WriteUsercmdF = (WriteUsercmd_t) Utils :: FindSignature ("client_panorama.dll", "55 8B EC 83 E4 F8 51 53 56 8B D9 8B 0D");
WriteUsercmdF (buf, in, out);

};
int * pNumBackupCommands = (int *) (reinterpret_cast <uintptr_t> (buf) - 0x30);
int * pNumNewCommands = (int *) (reinterpret_cast <uintptr_t> (buf) - 0x2C);
auto net_channel = * reinterpret_cast <NetChannel * *> (reinterpret_cast <uintptr_t> (g_pClientState) + 0x9C);
int32_t new_commands = * pNumNewCommands;

if (! Globals :: bInSendMove) {
if (new_commands <= 0)
return false;

Globals :: bInSendMove = true;
Globals :: bFirstSendMovePack = true;
Globals :: m_nTickbaseShift + = new_commands;

while (Globals :: m_nTickbaseShift> 0) {
CL_SendMove ();
Globals :: bFirstSendMovePack = false;
}

Globals :: bInSendMove = false;
return false;
}

if (! Globals :: bFirstSendMovePack) {
int32_t loss = min (Globals :: m_nTickbaseShift, 10);

Globals :: m_nTickbaseShift - = loss;
net_channel-> m_nOutSequenceNr + = loss;
}

int32_t next_cmdnr = g_pClientState-> m_nLastOutgoingCommand + g_pClientState-> m_nChokedCommands + 1;
int32_t total_new_commands = min (Globals :: m_nTickbaseShift, 62);
Globals :: m_nTickbaseShift - = total_new_commands;

from = -1;
* pNumNewCommands = total_new_commands;
* pNumBackupCommands = 0;

for (to = next_cmdnr - new_commands + 1; to <= next_cmdnr; to ++) {
if (! ofunct (ecx, slot, buf, from, to, isnewcommand))
return false;

from = to;
}

CUserCmd * last_realCmd = g_GameInput-> GetUserCmd (slot, from);
CUserCmd fromCmd;

if (last_realCmd)
fromCmd = * last_realCmd;

CUserCmd toCmd = fromCmd;
toCmd.command_number ++;
toCmd.tick_count + = 200;

for (int i = new_commands; i <= total_new_commands; i ++) {
WriteUsercmd (buf, & toCmd, & fromCmd);
fromCmd = toCmd;
toCmd.command_number ++;
toCmd.tick_count ++;
}

return true;

Hooks.cpp under FrameStageNotify hooking:
g_Hooks.pClientHook -> Hook (24, Hooks :: hkdWriteUsercmdDeltaToBuffer);
Hooks.cpp in Createmove:
if (c_config::get().doubletap && (Globals::pCmd->buttons & IN_ATTACK))
{
if (Globals::nSinceUse++ <3)
Globals::m_nTickbaseShift = TIME_TO_TICKS(2.0f);
}
else {
Globals::nSinceUse = 0;
}

}
ляя,реально пасибо
 
Забаненный
Статус
Оффлайн
Регистрация
21 Авг 2019
Сообщения
1,461
Реакции[?]
502
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу