AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Setting User Aim (https://forums.alliedmods.net/showthread.php?t=214102)

devWaleed 04-23-2013 04:26

Setting User Aim
 
I have searched alot on setting user aims, I found this, but this doen't work. What am I doing wrong?

Code:

        new Float:fAngles[3]
        pev( 1, pev_angles, fAngles )
        fAngles[0] = fAngles[0] * 90
        set_pev( 1, pev_angles, fAngles )


hornet 04-23-2013 04:29

Re: Setting User Aim
 
Add this line in after what you have:
Code:
set_pev( 1, pev_fixangle, 1 );

Not sure why you are using 1 as index though? Are you testing on LAN?

devWaleed 04-23-2013 04:33

Re: Setting User Aim
 
Oops, Yes, Index is id not 1. It is actually working now,
So,

Code:

set_pev( 1, pev_fixangle, 1 );
What does this do?

-Thanks.

hornet 04-23-2013 06:29

Re: Setting User Aim
 
Setting pev_v_angle and pev_angles only changes the value. pev_fixangle sets the value of pev_v_angle / pev_angles and changes the view / model accordingly.


All times are GMT -4. The time now is 10:50.

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