CVector getLocalPlayerPositionRaw()
{
void* pPlayerPed = *reinterpret_cast<void**>(0xB6F5F0);
if (!pPlayerPed)
return { 0,0,0 };
void* pMatrix = *reinterpret_cast<void**>(
reinterpret_cast<std::uintptr_t>(pPlayerPed) + 0x14
);
if (!pMatrix)
return { 0,0,0 };
const CVector pos = *reinterpret_cast<sampapi::CVector*>(
reinterpret_cast<std::uintptr_t>(pMatrix) + 0x30
);
return pos;
}