Raised This Month: $ Target: $400
 0% 

Get Player Shot angle


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-18-2013 , 11:19   Re: Get Player Shot angle
Reply With Quote #1

Quote:
Originally Posted by Phant View Post
But, angle is two numbers, like pev_v_angle or pev_punchangle. Or like BSP Viewer, try Edit / Copy Camera Angles, you got two float numbers.
I want get angle of each weapon shot TraceLine (from player eyes position). I think this is correct and possible, but how ?
What are you trying do?
And also no, it's pitch, yaw, and roll for angles.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-18-2013 , 16:27   Re: Get Player Shot angle
Reply With Quote #2

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
Reply



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