Raised This Month: $ Target: $400
 0% 

*Actually* Change a players aiming angles?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-12-2007 , 15:28   *Actually* Change a players aiming angles?
Reply With Quote #1

I have searched for quite a while and have never seen anyone successfully do this.

I want to change the vector that a client's crosshair is aiming at.
(Reason has to do with DoD's style of recoil handling, a lot diff. than cs)

I can absolutely get the aim, by reading pev_v_angle or reading UC_ViewAngles, but neither actually do anything when I set them.

One of the threads on this forum suggested setting pev_fixangle to 1 after I set pev_v_angle. That's a misinterpretation - all pev_fixangle does is the equivelant of pressing the "Home" key on your keyboard in game - it brings your aim back to straight forward (y-angle-wise).

----------------------------------------

I have tried hooking CmdStart, which allows me to read UC_ViewAngles but not set them. I have tried this in normal register_forward() and as post.

Code:
public hook_CmdStart( id, uc_handle, seed ) {     if( !is_user_alive( id ) ) return FMRES_IGNORED;     if( g_logging[id] )     {         new Float:m_viewangles[3];         get_uc( uc_handle, UC_ViewAngles, m_viewangles );         g_logging[id] = 0;         console_print( id, "Get UC_ViewAngles currently {%f, %f, %f}", m_viewangles[0], m_viewangles[1], m_viewangles[2] );     }     else     {         set_uc( uc_handle, UC_ViewAngles, g_set[id] );         return FMRES_SUPERCEDE;     }         return FMRES_IGNORED; }

Note that g_set is a global variable set with a client command in a properly working function.

Has anyone ever actually changed where a player is aiming, or knows how?
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:06.


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