Searching for myself
Пользователь
Статус
Оффлайн
Регистрация
29 Сен 2021
Сообщения
212
Реакции[?]
69
Поинты[?]
11K
Переделай на nl
code_language.lua:
ffi.cdef [[
    typedef uintptr_t ( __thiscall* pGetClientEntity )( void *, int );

    typedef struct {
        char    m_chPadding1[ 0x109 ];
        bool    m_bHitGroundAnimation;
    } CPlayerAnimationState_t;
]]

local function GetEntityAddress( iIndex )
    local pEntityList = ffi.cast( 'void***', memory.create_interface( 'client.dll', 'VClientEntityList003' ) )
    local GetAddressFN = ffi.cast( 'pGetClientEntity', pEntityList[ 0 ][ 3 ] )

    return GetAddressFN( pEntityList, iIndex )
end

local function GetAnimationState( pPlayer )
    return ffi.cast( 'CPlayerAnimationState_t**', ffi.cast( 'uintptr_t', pPlayer ) + 0x9960 )[ 0 ]
end

function ZeroPitchOnLand(pAntiAims)
    local pLocalPlayer = entity_list.get_local_player( )

    if pLocalPlayer == nil or not pLocalPlayer:is_alive( ) then
        return
    end
    
    local pLocalPlayerPtr = GetEntityAddress( pLocalPlayer:get_index( ) )

    if pLocalPlayerPtr == nil then
        return
    end
    
    if GetAnimationState( pLocalPlayerPtr ).m_bHitGroundAnimation then
        pAntiAims:set_render_pose( e_poses.BODY_PITCH, 0.65 )
    end
end
 
VirtualAllocEx
Пользователь
Статус
Оффлайн
Регистрация
30 Дек 2021
Сообщения
358
Реакции[?]
83
Поинты[?]
5K
Может кто ни будь скинуть сурс, чтобы поднялся питч когда ты на земле (в нле)
code_language.lua:
local m_fFlags = utils.get_netvar_offset("DT_BasePlayer", "m_fFlags")
print(m_fFlags)
И отследи флаг, когда ты стоишь (не помню как в луа делается проверка, но в c++: ent->m_fFlags() & FL_ONGROUND)
 
Femboy Access
Эксперт
Статус
Оффлайн
Регистрация
11 Ноя 2020
Сообщения
1,335
Реакции[?]
428
Поинты[?]
96K
(не помню как в луа делается проверка, но в c++: ent->m_fFlags() & FL_ONGROUND)
Код:
local lsh = bit.lshift

local FL_ = {
    DUCKING     = lsh(1,1) -- Player flag -- Player is fully crouched
    ANIMDUCKING = lsh(1,2) -- Player flag -- Player is in the process of crouching or uncrouching but could be in transition
    -- Fully ducked: FL_.DUCKING and FL_.ANIMDUCKING
    -- Previously fully ducked, unducking in progress: FL_.DUCKING and not FL_.ANIMDUCKING
    -- Fully unducked: not FL_.DUCKING and not FL_.ANIMDUCKING
    -- Previously fully unducked, ducking in progress: not FL_.DUCKING and FL_.ANIMDUCKING

    ONGROUND   = lsh(1,0) -- At rest / on the ground
    WATERJUMP  = lsh(1,3) -- player jumping out of water
    ONTRAIN    = lsh(1,4) -- Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
    INRAIN     = lsh(1,5) -- Indicates the entity is standing in rain
    FROZEN     = lsh(1,6) -- Player is frozen for 3rd person camera
    ATCONTROLS = lsh(1,7) -- Player can't move, but keeps key inputs for controlling another entity
    CLIENT     = lsh(1,8) -- Is a player
    FAKECLIENT = lsh(1,9) -- Fake client, simulated server side; don't send network messages to them

    -- NON-PLAYER SPECIFIC (i.e., not used by GameMovement or the client .dll ) -- Can still be applied to players, though
    INWATER = lsh(1,10) -- In water
    SWIM    = lsh(1,12) -- Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
    GODMODE = lsh(1,16)
}
Код:
print(bit.band(entity.get_local_player().m_fFlags, FL_.ONGROUND))
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
13 Сен 2022
Сообщения
40
Реакции[?]
2
Поинты[?]
0
Код:
local lsh = bit.lshift

local FL_ = {
    DUCKING     = lsh(1,1) -- Player flag -- Player is fully crouched
    ANIMDUCKING = lsh(1,2) -- Player flag -- Player is in the process of crouching or uncrouching but could be in transition
    -- Fully ducked: FL_.DUCKING and FL_.ANIMDUCKING
    -- Previously fully ducked, unducking in progress: FL_.DUCKING and not FL_.ANIMDUCKING
    -- Fully unducked: not FL_.DUCKING and not FL_.ANIMDUCKING
    -- Previously fully unducked, ducking in progress: not FL_.DUCKING and FL_.ANIMDUCKING

    ONGROUND   = lsh(1,0) -- At rest / on the ground
    WATERJUMP  = lsh(1,3) -- player jumping out of water
    ONTRAIN    = lsh(1,4) -- Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
    INRAIN     = lsh(1,5) -- Indicates the entity is standing in rain
    FROZEN     = lsh(1,6) -- Player is frozen for 3rd person camera
    ATCONTROLS = lsh(1,7) -- Player can't move, but keeps key inputs for controlling another entity
    CLIENT     = lsh(1,8) -- Is a player
    FAKECLIENT = lsh(1,9) -- Fake client, simulated server side; don't send network messages to them

    -- NON-PLAYER SPECIFIC (i.e., not used by GameMovement or the client .dll ) -- Can still be applied to players, though
    INWATER = lsh(1,10) -- In water
    SWIM    = lsh(1,12) -- Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
    GODMODE = lsh(1,16)
}
Код:
print(bit.band(entity.get_local_player().m_fFlags, FL_.ONGROUND))
Благодарю мужик
Animstate->hit_ground_animation
А если в аирах то как?
(Я просто смотрел и не нашёл в аним стейте)
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
4 Авг 2022
Сообщения
101
Реакции[?]
47
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу