[SOLVED] checking if the user is aiming outside
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:
Any and all help appreciated. |
Re: checking if the user is aiming outside
It always returns true because the origin will always go in the sky, so basically you will always seem to be outside.
The way to do this right is with traceline. Here is the stock, I have not tested it! I wrote it here directly. PHP Code:
|
Re: checking if the user is aiming outside
Quote:
There's one problem with that code(compile error), I get a warning on line 60, tag mismatch. Line 60: Code:
I'm going to test this anyways just to see if that causes a problem or not. EDIT: I tested it with that tag mismatch, and the same result. It always returns true. Any ideas? |
Re: checking if the user is aiming outside
Quote:
Code:
|
Re: checking if the user is aiming outside
Got it working. Thanks.
|
Re: checking if the user is aiming outside
Quote:
|
Re: [SOLVED] checking if the user is aiming outside
changed the return into this:
PHP Code:
|
Re: [SOLVED] checking if the user is aiming outside
Quote:
PHP Code:
|
Re: [SOLVED] checking if the user is aiming outside
Quote:
|
Re: [SOLVED] checking if the user is aiming outside
Quote:
|
| All times are GMT -4. The time now is 07:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.