HOME FORUMS MEMBERS RECENT POSTS LOG IN  
× Авторизация
Имя пользователя:
Пароль:
Нет аккаунта? Регистрация
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ ЧАТ
loading...
Скрыть
Вернуться   ANTICHAT > ПРОГРАММИРОВАНИЕ > Общие вопросы программирования
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

  #1  
Старый 05.02.2026, 00:07
fucin
Новичок
Регистрация: 07.04.2024
Сообщений: 8
С нами:
1107973

Репутация: 1
По умолчанию

Tentei algumas maneiras, mas não tive sucesso. Gostaria de ajuda com isso. Desculpe se escrevi na seção errada, não sou da Rússia.
 
Ответить с цитированием

  #2  
Старый 05.02.2026, 17:03
yorenov
Познающий
Регистрация: 08.11.2023
Сообщений: 65
С нами:
1324882

Репутация: 23
По умолчанию

Цитата:
Сообщение от enzaoboladao  

Tentei algumas maneiras, mas não tive sucesso. Gostaria de ajuda com isso. Desculpe se escrevi na seção errada, não sou da Rússia.
C++:





Код:
sampapi::CVector getLocalPosition() {
    sampapi::CVector pos{0, 0, 0};

    auto pNetGame = sampapi::v037r3::RefNetGame();
    if (!pNetGame) return pos;

    auto pPlayerPool = pNetGame->GetPlayerPool();
    if (!pPlayerPool) return pos;

    auto pLocalPlayer = pPlayerPool->GetLocalPlayer();
    if (!pLocalPlayer) return pos;

    pos.x = pLocalPlayer->m_onfootData.m_position.x;
    pos.y = pLocalPlayer->m_onfootData.m_position.y;
    pos.z = pLocalPlayer->m_onfootData.m_position.z;

    return pos;
}


or without sampapi

C++:





Код:
CVector getLocalPlayerPositionRaw()
{
    void* pPlayerPed = *reinterpret_cast(0xB6F5F0);
    if (!pPlayerPed)
        return { 0,0,0 };

    void* pMatrix = *reinterpret_cast(
        reinterpret_cast(pPlayerPed) + 0x14
    );
    if (!pMatrix)
        return { 0,0,0 };

    const CVector pos = *reinterpret_cast(
        reinterpret_cast(pMatrix) + 0x30
    );

    return pos;
}
 
Ответить с цитированием

  #3  
Старый 05.02.2026, 19:16
fucin
Новичок
Регистрация: 07.04.2024
Сообщений: 8
С нами:
1107973

Репутация: 1
По умолчанию

Цитата:
Сообщение от yorenov  

C++:





Код:
sampapi::CVector getLocalPosition() {
    sampapi::CVector pos{0, 0, 0};

    auto pNetGame = sampapi::v037r3::RefNetGame();
    if (!pNetGame) return pos;

    auto pPlayerPool = pNetGame->GetPlayerPool();
    if (!pPlayerPool) return pos;

    auto pLocalPlayer = pPlayerPool->GetLocalPlayer();
    if (!pLocalPlayer) return pos;

    pos.x = pLocalPlayer->m_onfootData.m_position.x;
    pos.y = pLocalPlayer->m_onfootData.m_position.y;
    pos.z = pLocalPlayer->m_onfootData.m_position.z;

    return pos;
}


or without sampapi

C++:





Код:
CVector getLocalPlayerPositionRaw()
{
    void* pPlayerPed = *reinterpret_cast(0xB6F5F0);
    if (!pPlayerPed)
        return { 0,0,0 };

    void* pMatrix = *reinterpret_cast(
        reinterpret_cast(pPlayerPed) + 0x14
    );
    if (!pMatrix)
        return { 0,0,0 };

    const CVector pos = *reinterpret_cast(
        reinterpret_cast(pMatrix) + 0x30
    );

    return pos;
}

This gives the player's position, not their position without lag compensation.I need to get a player's lag position to perform a lagshot esp.
 
Ответить с цитированием
Ответ





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT ™ © 2001- Antichat Kft.