AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detect looking at bomb (https://forums.alliedmods.net/showthread.php?t=102281)

BOYSplayCS 08-31-2009 13:04

Detect looking at bomb
 
How would you detect if a player is looking at the bomb?

AntiBots 08-31-2009 13:12

Re: Detect looking at bomb
 
is_in_viewcone(entity, const Float:origin[3], use3d = 0) ?

BOYSplayCS 08-31-2009 13:18

Re: Detect looking at bomb
 
Hmm, I don't think that's it. I mean a whole function.

SnoW 08-31-2009 13:19

Re: Detect looking at bomb
 
I believe you want to detect if player is looking direct to bomb instead of just seeing it. Then you would do something similiar as:
PHP Code:

new entbodypart;
get_user_aimingidentbodypart );
if( 
is_ent_bombent ) )
     
//Action 


BOYSplayCS 08-31-2009 13:20

Re: Detect looking at bomb
 
Ah, that makes more sense. Thank you SnoW ;)


All times are GMT -4. The time now is 15:09.

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