
11.08.2025, 19:56
|
|
Познающий
Регистрация: 03.08.2022
Сообщений: 57
С нами:
1990627
Репутация:
8
|
|
Пытаюсь получить координаты локального игрока в мире, но почему-то они постоянно 0.
Что не так?
cpp:
Код:
Это R3
CVector* pos = samp->getPos();
printf("x: %f, y: %f, z: %f\n", pos->x, pos->y, pos->z);
uintptr_t* getPlayerEntity() {
uintptr_t player_pool = getPlayerPool();
uintptr_t local_info = player_pool + 0x2F14;
return reinterpret_cast(local_info + 0x2A4);
}
CVector* getPos() {
uintptr_t* gamePed = getPlayerEntity();
if (gamePed != nullptr) {
return reinterpret_cast(0x4043A0)(gamePed);
}
//return CVector(1.0, 5.0, 10.0);
}
// 0x4043A0
CSimpleTransform *__thiscall CEntity::GetPosition(CEntity *this) - функция в IDA PRO
|
|
|