Raised This Month: $ Target: $400
 0% 

[SOLVED] checking if the user is aiming outside


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-14-2010 , 03:51   [SOLVED] checking if the user is aiming outside
Reply With Quote #1

I'm currently trying to check if the player is aiming outside, like on de_dust2, in B tunnels would be inside.. you get the point(hopefully).

I have this code to check for it but the problem is that it always returns true, even when I'm in B tunnels. I've also tested this on cs_italy and the same result comes.

Code:
#include <amxmodx> #include <fakemeta> public plugin_init( ) {     register_plugin( "Test", "1.0", "Kreation" );         register_clcmd( "say /test", "CmdTest" ); } public CmdTest( id ) {     if( is_aiming_outside( id ) )     {         client_print( id, print_chat, "You're aiming outside, you're awesome!" );     }     else     {         client_print( id, print_chat, "You're not aiming outside, you're still awesome!" );     } } stock bool:is_aiming_outside( id ) {     new origin[3], Float:origin2[3];     get_user_origin( id, origin, 3 );     IVecFVec( origin, origin2 );         new i;         while( ( ++i < 45 ) && ( engfunc( EngFunc_PointContents, origin2 ) == CONTENTS_EMPTY ) )     {         origin2[2] + 15.0;     }         return ( engfunc( EngFunc_PointContents, origin2 ) ) ? true : false; }

Any and all help appreciated.
__________________
Hi.

Last edited by Kreation; 07-14-2010 at 23:29.
Kreation 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 07:16.


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