find if player is aiming at another player
I'm trying to figure out how to code my plugin so that when a player looks at another player (!is_user_bot) it does an emit_sound. I was unsure how to do this using stock fm_get_aim_origin(index, Float:origin[3]) and then checking if a !is_user_bot is located in that origin. I was also wondering if there is just a simpler way instead of having checks every 0.1 seconds.
|
Re: find if player is aiming at another player
get_user_aiming
|
Re: find if player is aiming at another player
Will that be able to check if there is a player is in sight?
|
Re: find if player is aiming at another player
There are plugins that use events for when a player aims at another, such as an XP mod.
Look in the source code and find them. |
Re: find if player is aiming at another player
K, will do, thanks
|
Re: find if player is aiming at another player
I'm not getting any errors and so far it works good except I would like a way to delay in between the sounds because right now it just plays them on top of each other. Like i would like it to register the StatusValue once and then stop registering it for the activated id for 5 seconds or so.
|
Re: find if player is aiming at another player
Like how can i stop the register_event from working for a period of time
|
Re: find if player is aiming at another player
Quote:
|
Re: find if player is aiming at another player
Nevermind, i figure it out by myself. I used a system of checking a variable the event would run == 1 and then after the sound it'd change the variable to 2 and set task to another public which would change the variable back to 1, thus delaying the sounds.
|
| All times are GMT -4. The time now is 18:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.