y0mike
Active member
its shitty, but its almost working
the problem
trying not to copypaste,
this is what happens (it just aims at the top right of the player...)
the problem
Code:
auto m_vpos = pLocalPed->m_pCoords->pos;
auto f_pos = pRemotePlayer->pPlayerData->fOnFootPos;
float m_pos[3] = { m_vpos.x, m_vpos.y, m_vpos.z };
float distanceXZ = sqrtf(pow(f_pos[0] - m_pos[0], 2) + pow(f_pos[2] - m_pos[2], 2));
float f_z = atan2((f_pos[1] - m_pos[1]), distanceXZ);
float f_x = atan2((f_pos[2] - m_pos[2]), distanceXZ);
f_z = -f_z;
f_x = -f_x;
*(float*)0x00B6F248 = f_x;
*(float*)0x00B6F258 = f_z; // side to side
trying not to copypaste,
this is what happens (it just aims at the top right of the player...)

