| thezolotoi |
08-20-2021 08:18 |
A problem with pev_angles and pev_v_angle
I have a code to change the side the entity is looking at
PHP Code:
new iOrigin[3], Float:vecOrigin[3]; get_user_origin(pPlayer, iOrigin, Origin_AimEndEyes); IVecFVec(iOrigin, vecOrigin); engfunc(EngFunc_SetOrigin, g_iGrabEntityId, vecOrigin); new Float:vecAngles[3]; pev(g_iGrabEntityId, pev_angles, vecAngles); if(pev(pPlayer, pev_button) & IN_ATTACK) vecAngles[1] += 3.0; if(pev(pPlayer, pev_button) & IN_ATTACK2) vecAngles[1] -= 3.0; if(pev(pPlayer, pev_button) & IN_RELOAD) vecAngles[0] -= 3.0; if(pev(pPlayer, pev_button) & IN_DUCK) vecAngles[2] -= 3.0; set_pev(g_iGrabEntityId, pev_angles, vecAngles);
And when I try to look from the sight of the entity:
PHP Code:
engfunc(EngFunc_SetView, id, aDataCamera[CAMERA_ID]);
Top and bottom are reversed, how to fix it?
I tried to fix it with but no results:
PHP Code:
set_pev(g_iGrabEntityId, pev_v_angle, vecAngles); set_pev(g_iGrabEntityId, pev_fixangle, 1);
|