Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Вопрос Help please CUserCmd

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
18 Ноя 2023
Сообщения
7
Реакции
0
Hi!, im trying to make movements with CUserCmd like IN_ATTACK IN_JUMP etc etc but it donst work on official servers, when i play with bots it works fine but go to deathmatch and dont do anything, no crash no nothing.

I have like 24 hours without sleep making the CUserCmd fully structure by myself but it do the same....

Please i find a hint or something about.

Many thanks!

Im using the CreateMove without CMD header, i take it from CMDArray.

Two Ways Tried:
Expand Collapse Copy
            // Button state (client-side prediction)
            pCmd->pButtonState.nValue |= IN_ATTACK;
            pCmd->pButtonState.nValueChanged |= IN_ATTACK;

            // Button state (server-side, protobuf)
            pBaseCmd->pInButtonState->SetBits(EButtonStatePBBits::BUTTON_STATE_PB_BITS_BUTTONSTATE1);
            pBaseCmd->pInButtonState->nValue |= IN_ATTACK;
            pBaseCmd->pInButtonState->nValueChanged |= IN_ATTACK;

Structures:
Expand Collapse Copy
struct CInButtonState
{
public:
    void* vtable;
    std::uint64_t nValue; // 0x8
    std::uint64_t nValueChanged; // 0x10
    std::uint64_t nValueScroll; // 0x18
};

struct CInButtonStatePB : CBasePB
{
public:
    uint64_t nValue;
    uint64_t nValueChanged;
    uint64_t nValueScroll;
};

class CBaseUserCmdPB : public CBasePB
{
public:
    char pad[0x18];
    std::uintptr_t strMoveCrc;
    CInButtonStatePB* pInButtonState;
    CMsgQAngle* pViewAngles;
    std::int32_t nLegacyCommandNumber;
    std::int32_t m_nTickCount;
    float flForwardMove;
    float flSideMove;
    float flUpMove;
    std::int32_t nImpulse;
    std::int32_t nWeaponSelect;
    std::int32_t nRandomSeed;
    std::int32_t nMousedX;
    std::int32_t nMousedY;
    std::uint32_t nConsumedServerAngleChanges;
    std::int32_t nCmdFlags;
    std::uint32_t nPawnEntityHandle;
}

class CCSGOUserCmdPB
{
public:
    void* vtable;
    std::uint32_t nHasBits;
    std::uint64_t nCachedSize;
    RepeatedPtrField_t<CCSGOInputHistoryEntryPB> inputHistoryField;
    CBaseUserCmdPB* pBaseCmd;
    bool bLeftHandDesired;
    bool bIsPredictingBodyShotFX;
    bool bIsPredictingHeadShotFX;
    bool bIsPredictingKillRagdolls;
    std::int32_t nAttack3StartHistoryIndex;
    std::int32_t nAttack1StartHistoryIndex;
    std::int32_t nAttack2StartHistoryIndex;
}

class CUserCmd
{
public:
    char pad1[0x10];
    CCSGOUserCmdPB csgoUserCmd; // 0x10
    CInButtonState pButtonState; // 0x58
}
 
Назад
Сверху Снизу