AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   A problem with pev_angles and pev_v_angle (https://forums.alliedmods.net/showthread.php?t=333958)

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(pPlayeriOriginOrigin_AimEndEyes);
    
IVecFVec(iOriginvecOrigin);
    
engfunc(EngFunc_SetOriging_iGrabEntityIdvecOrigin);
    
    new 
Float:vecAngles[3];
    
pev(g_iGrabEntityIdpev_anglesvecAngles);
    
    if(
pev(pPlayerpev_button) & IN_ATTACK
        
vecAngles[1] += 3.0;
    
    if(
pev(pPlayerpev_button) & IN_ATTACK2
        
vecAngles[1] -= 3.0;
    
    if(
pev(pPlayerpev_button) & IN_RELOAD
        
vecAngles[0] -= 3.0;
    
    if(
pev(pPlayerpev_button) & IN_DUCK
        
vecAngles[2] -= 3.0;
    
    
set_pev(g_iGrabEntityIdpev_anglesvecAngles); 

And when I try to look from the sight of the entity:
PHP Code:

engfunc(EngFunc_SetViewidaDataCamera[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_iGrabEntityIdpev_v_anglevecAngles);
    
set_pev(g_iGrabEntityIdpev_fixangle1); 


thezolotoi 08-20-2021 08:20

Re: A problem with pev_angles and pev_v_angle
 
In this variable aDataCamers[CAMERA_ID] = g_iGrabEntityId;


All times are GMT -4. The time now is 02:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.