entity aim info using traceline
Hey. So I have come across a problem that I don't know how to solve.
In order to set hud displaying some player's status I am using something like this : Code:
So as long as I am aiming at a player, the hud message will show up. When I move away my cursor, the hudmessage is instantly hidden because I catched the event on_HideStatus() and cleared my hud there. How can I do the same thing with entities (using traceline?). I mean I can catch the moment when I am aiming at some entity and show the hudmessage, however this hudmessage will dissapear only after some time after I move my aim from the entity. Could you please help me with the algorytm or maybe provide some example code? An idea on how to catch the moment, when I stopped aiming at that particular entity would be nice! E: I could also send the "clear hud" function to a client every time I see the conditions for my entity are not met, but that would be too inefficient (sending every 0.000...1s or so a message to clear HUD) |
Re: entity aim info using traceline
Use sync hud
Theres a function to remove sync hud easily |
Re: entity aim info using traceline
Quote:
|
Re: entity aim info using traceline
Look at this plugin: https://forums.alliedmods.net/showthread.php?t=277524
|
Re: entity aim info using traceline
Okay, thank you for your answers. I have decided I will do it in the following way :
Code:
|
| All times are GMT -4. The time now is 09:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.