Raised This Month: $ Target: $400
 0% 

Get Player Shot angle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-18-2013 , 16:27   Re: Get Player Shot angle
Reply With Quote #7

You should do this :
PHP Code:
{
    new 
Float:aim_vec[3];
    
pev(idpev_v_angleaim_vec);
    
engfunc(EngFunc_MakeVectorsaim_vec);
    
global_get(glb_v_forwardaim_vec);

You can trick it doing that (same thing is done internally to amxx):
PHP Code:
{
    new 
Float:aim_vec[3];
    
velocity_by_aim(id1aim_vec);

And if it is for traceline, to velocity_by_aim(id, 9999, aim_vec); so you can use player gun origin for trace start, and add aim_vec to start to set end position.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-18-2013 at 16:28.
ConnorMcLeod is offline
 



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:18.


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