Вопрос Вылетает при исполнении ~IN_JUMP

Начинающий
Статус
Оффлайн
Регистрация
23 Авг 2024
Сообщения
9
Реакции[?]
0
Поинты[?]
0
C++:
typedef void(__fastcall* oCreateMoveFn)(int*, int, char, UserCmd*);
inline oCreateMoveFn oCreateMove = nullptr;

void __fastcall CreateMoveHook(int* ecx, int edx, char a2, UserCmd *cmd)
{

    if (bhoprea)
    {
        uintptr_t base = (uintptr_t)GetModuleHandle("client.dll");

        uintptr_t localPlayerPawn = *(uintptr_t*)(base + o::dwLocalPlayerPawn);

        uint32_t flags = *(uint32_t*)(localPlayerPawn + o::m_fFlags);
        if (localPlayerPawn != NULL) {

            if (GetAsyncKeyState(VK_SPACE) && (flags) & 1)
            {
                cmd->buttons &= ~IN_JUMP;
            }
        }
    }
    if (hitsound) {
        uintptr_t client = (uintptr_t)GetModuleHandle("client.dll");
        

        uintptr_t localPlayerPawn = *(uintptr_t*)(client + o::dwLocalPlayerPawn);


        if (localPlayerPawn != NULL) {

            Vec3 fallvel = *(Vec3*)(localPlayerPawn + o::m_vecVelocity);

        }
            

        
    }
    

    oCreateMove(ecx, edx, a2, cmd);
}
Usercmd:
Код:
#include "../../src/math/math.h"
enum CommandButtons : int
{
    IN_ATTACK = (1 << 0),
    IN_JUMP = (1 << 1),
    IN_DUCK = (1 << 2),
    IN_FORWARD = (1 << 3),
    IN_BACK = (1 << 4),
    IN_USE = (1 << 5),
    IN_CANCEL = (1 << 6),
    IN_LEFT = (1 << 7),
    IN_RIGHT = (1 << 8),
    IN_MOVELEFT = (1 << 9),
    IN_MOVERIGHT = (1 << 10),
    IN_SECOND_ATTACK = (1 << 11),
    IN_RUN = (1 << 12),
    IN_RELOAD = (1 << 13),
    IN_LEFT_ALT = (1 << 14),
    IN_RIGHT_ALT = (1 << 15),
    IN_SCORE = (1 << 16),
    IN_SPEED = (1 << 17),
    IN_WALK = (1 << 18),
    IN_ZOOM = (1 << 19),
    IN_FIRST_WEAPON = (1 << 20),
    IN_SECOND_WEAPON = (1 << 21),
    IN_BULLRUSH = (1 << 22),
    IN_FIRST_GRENADE = (1 << 23),
    IN_SECOND_GRENADE = (1 << 24),
    IN_MIDDLE_ATTACK = (1 << 25)
};






struct UserCmd
{
    void* vmt;
    int commandNumber;
    int tickCount;
    Vec3 viewPoint;
    Vec3 aimDirection;
    float forwardMove;
    float sideMove;
    float upMove;
    uint64_t buttons;
    char impulse;
    int weaponSelect;
    int weaponSubType;
    int randomSeed;
    short mouseDeltaX;
    short mouseDeltaY;
    bool hasBeenPredicted;
    Vec3 headAngles;
    Vec3 headOffset;
};
Кто нибудь знает в чем проблема?
 
Пользователь
Статус
Оффлайн
Регистрация
25 Мар 2021
Сообщения
161
Реакции[?]
70
Поинты[?]
27K
C++:
typedef void(__fastcall* oCreateMoveFn)(int*, int, char, UserCmd*);
inline oCreateMoveFn oCreateMove = nullptr;

void __fastcall CreateMoveHook(int* ecx, int edx, char a2, UserCmd *cmd)
{

    if (bhoprea)
    {
        uintptr_t base = (uintptr_t)GetModuleHandle("client.dll");

        uintptr_t localPlayerPawn = *(uintptr_t*)(base + o::dwLocalPlayerPawn);

        uint32_t flags = *(uint32_t*)(localPlayerPawn + o::m_fFlags);
        if (localPlayerPawn != NULL) {

            if (GetAsyncKeyState(VK_SPACE) && (flags) & 1)
            {
                cmd->buttons &= ~IN_JUMP;
            }
        }
    }
    if (hitsound) {
        uintptr_t client = (uintptr_t)GetModuleHandle("client.dll");
      

        uintptr_t localPlayerPawn = *(uintptr_t*)(client + o::dwLocalPlayerPawn);


        if (localPlayerPawn != NULL) {

            Vec3 fallvel = *(Vec3*)(localPlayerPawn + o::m_vecVelocity);

        }
          

      
    }
  

    oCreateMove(ecx, edx, a2, cmd);
}
Usercmd:
Код:
#include "../../src/math/math.h"
enum CommandButtons : int
{
    IN_ATTACK = (1 << 0),
    IN_JUMP = (1 << 1),
    IN_DUCK = (1 << 2),
    IN_FORWARD = (1 << 3),
    IN_BACK = (1 << 4),
    IN_USE = (1 << 5),
    IN_CANCEL = (1 << 6),
    IN_LEFT = (1 << 7),
    IN_RIGHT = (1 << 8),
    IN_MOVELEFT = (1 << 9),
    IN_MOVERIGHT = (1 << 10),
    IN_SECOND_ATTACK = (1 << 11),
    IN_RUN = (1 << 12),
    IN_RELOAD = (1 << 13),
    IN_LEFT_ALT = (1 << 14),
    IN_RIGHT_ALT = (1 << 15),
    IN_SCORE = (1 << 16),
    IN_SPEED = (1 << 17),
    IN_WALK = (1 << 18),
    IN_ZOOM = (1 << 19),
    IN_FIRST_WEAPON = (1 << 20),
    IN_SECOND_WEAPON = (1 << 21),
    IN_BULLRUSH = (1 << 22),
    IN_FIRST_GRENADE = (1 << 23),
    IN_SECOND_GRENADE = (1 << 24),
    IN_MIDDLE_ATTACK = (1 << 25)
};






struct UserCmd
{
    void* vmt;
    int commandNumber;
    int tickCount;
    Vec3 viewPoint;
    Vec3 aimDirection;
    float forwardMove;
    float sideMove;
    float upMove;
    uint64_t buttons;
    char impulse;
    int weaponSelect;
    int weaponSubType;
    int randomSeed;
    short mouseDeltaX;
    short mouseDeltaY;
    bool hasBeenPredicted;
    Vec3 headAngles;
    Vec3 headOffset;
};
Кто нибудь знает в чем проблема?
C++:
class c_user_cmd
{
public:
    char pad_valve_shizo[0x10];
    CSGOUserCmdPB pb;
    c_in_button_state button_state; //0x0040
    char gap78[8]; //0x0078
    double real_time; //0x0080
    bool has_been_predicted; //0x0088
    int command_type; //0x008C
    int cmd_prediction_type; //0x0090
};
pb - протобафф либа, можешь заменить её на то, что есть в асфиксии или на юц
 
Начинающий
Статус
Оффлайн
Регистрация
23 Авг 2023
Сообщения
10
Реакции[?]
0
Поинты[?]
0
C++:
typedef void(__fastcall* oCreateMoveFn)(int*, int, char, UserCmd*);
inline oCreateMoveFn oCreateMove = nullptr;

void __fastcall CreateMoveHook(int* ecx, int edx, char a2, UserCmd *cmd)
{

    if (bhoprea)
    {
        uintptr_t base = (uintptr_t)GetModuleHandle("client.dll");

        uintptr_t localPlayerPawn = *(uintptr_t*)(base + o::dwLocalPlayerPawn);

        uint32_t flags = *(uint32_t*)(localPlayerPawn + o::m_fFlags);
        if (localPlayerPawn != NULL) {

            if (GetAsyncKeyState(VK_SPACE) && (flags) & 1)
            {
                cmd->buttons &= ~IN_JUMP;
            }
        }
    }
    if (hitsound) {
        uintptr_t client = (uintptr_t)GetModuleHandle("client.dll");
      

        uintptr_t localPlayerPawn = *(uintptr_t*)(client + o::dwLocalPlayerPawn);


        if (localPlayerPawn != NULL) {

            Vec3 fallvel = *(Vec3*)(localPlayerPawn + o::m_vecVelocity);

        }
          

      
    }
  

    oCreateMove(ecx, edx, a2, cmd);
}
Usercmd:
Код:
#include "../../src/math/math.h"
enum CommandButtons : int
{
    IN_ATTACK = (1 << 0),
    IN_JUMP = (1 << 1),
    IN_DUCK = (1 << 2),
    IN_FORWARD = (1 << 3),
    IN_BACK = (1 << 4),
    IN_USE = (1 << 5),
    IN_CANCEL = (1 << 6),
    IN_LEFT = (1 << 7),
    IN_RIGHT = (1 << 8),
    IN_MOVELEFT = (1 << 9),
    IN_MOVERIGHT = (1 << 10),
    IN_SECOND_ATTACK = (1 << 11),
    IN_RUN = (1 << 12),
    IN_RELOAD = (1 << 13),
    IN_LEFT_ALT = (1 << 14),
    IN_RIGHT_ALT = (1 << 15),
    IN_SCORE = (1 << 16),
    IN_SPEED = (1 << 17),
    IN_WALK = (1 << 18),
    IN_ZOOM = (1 << 19),
    IN_FIRST_WEAPON = (1 << 20),
    IN_SECOND_WEAPON = (1 << 21),
    IN_BULLRUSH = (1 << 22),
    IN_FIRST_GRENADE = (1 << 23),
    IN_SECOND_GRENADE = (1 << 24),
    IN_MIDDLE_ATTACK = (1 << 25)
};






struct UserCmd
{
    void* vmt;
    int commandNumber;
    int tickCount;
    Vec3 viewPoint;
    Vec3 aimDirection;
    float forwardMove;
    float sideMove;
    float upMove;
    uint64_t buttons;
    char impulse;
    int weaponSelect;
    int weaponSubType;
    int randomSeed;
    short mouseDeltaX;
    short mouseDeltaY;
    bool hasBeenPredicted;
    Vec3 headAngles;
    Vec3 headOffset;
};
Кто нибудь знает в чем проблема?
Братан ты сделал кашу из external и internal мои глаза умирают
 
Пользователь
Статус
Оффлайн
Регистрация
25 Мар 2021
Сообщения
161
Реакции[?]
70
Поинты[?]
27K
C++:
class c_user_cmd
{
public:
    char pad_valve_shizo[0x10];
    CSGOUserCmdPB pb;
    c_in_button_state button_state; //0x0040
    char gap78[8]; //0x0078
    double real_time; //0x0080
    bool has_been_predicted; //0x0088
    int command_type; //0x008C
    int cmd_prediction_type; //0x0090
};
pb - протобафф либа, можешь заменить её на то, что есть в асфиксии или на юц
а, ну ещё в креейтмуве 3 аргумента, и юзер цмд там нету
 
Сверху Снизу