Raised This Month: $ Target: $400
 0% 

Check Target Infront of you


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-26-2007 , 22:23   Re: Check Target Infront of you
Reply With Quote #6

Code:
/* SDK function - checks if an origin is in an entity's view cone
 * Set use3d to 1 to do the calculation in 3D. Otherwise it will be in 2D.
 */
native is_in_viewcone(entity, Float:origin[3], use3d = 0);
As cheap suit said, the above is for checking if the entity is within the players sight.

Code:
Float: get_user_aiming ( index, &id, &body, [ distance = 9999 ] )
If you want to check if the person is within the cross hair then use this.

To check the distance of the player you can run a trace_line.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
 



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 00:41.


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