AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   If not aiming (solved) (https://forums.alliedmods.net/showthread.php?t=236723)

Buckshot 03-10-2014 05:20

If not aiming (solved)
 
How do i check if the user is NOT aiming at a certain player? i've already found out how to check if the user IS aiming at a target, whoever it is.. But that was get_user_aiming. There is no is_user_aiming that i can use with an if statement that can check if i'm aiming at the player i've already chosen.

I want something that would do this:
PHP Code:

if(!is_user_aiming(idtarget))
{
    
//bla



Kiske 03-10-2014 06:32

Re: If not aiming
 
PHP Code:

new iTarget;
new 
iBody;

get_user_aiming(idiTargetiBody);

if(
iTarget != player_chosen) {
      
// bla



Buckshot 03-10-2014 07:06

Re: If not aiming
 
Quote:

Originally Posted by Kiske (Post 2109976)
PHP Code:

new iTarget;
new 
iBody;

get_user_aiming(idiTargetiBody);

if(
iTarget != player_chosen) {
      
// bla



That only checks if i'm not aiming at a certain player.. I want to check if i'm not aiming at anyone at all.


Nevermind. Fixed.

Kiske 03-10-2014 09:34

Re: If not aiming
 
Quote:

Originally Posted by Buckshot (Post 2109967)
How do i check if the user is NOT aiming at a certain player?

Quote:

Originally Posted by Buckshot (Post 2109981)
That only checks if i'm not aiming at a certain player..

...

Buckshot 03-10-2014 09:57

Re: If not aiming
 
Quote:

Originally Posted by Kiske (Post 2110025)
...


Mistake, Sorry


All times are GMT -4. The time now is 06:04.

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