HUD Message When Looking at Player
I made a simple plugin where you can take the C4 from your bot teammate by being in a certain distance and pressing the USE key while aiming at it. I got this idea from CSGO and since I play with bots this is really handy.
It works perfectly but I was thinking of placing a HUD message when you aim at a bot teammate carrying a C4 to inform in other players. Like maybe it would say, "Press the USE key to take the C4 from your Bot teammate" or something like that. Thing is, I don't how to do this. How do hook this 'event ' of aiming at a player? Here's the whole code. And before you say 'this looks familiar', you're right. Its from joaquimandrade and ConnorMcLeod's Easy Weapon Trade plugin. PHP Code:
|
Re: [HELP] HUD Message When Looking at Player
Quote:
|
Re: [HELP] HUD Message When Looking at Player
Quote:
index is me and &id is the bot with the C4 I'm aiming at?... |
Re: [HELP] HUD Message When Looking at Player
Yes, it's the other players index.
|
Re: [HELP] HUD Message When Looking at Player
I see. But how do I trigger this? In the plugin, I had to press 'E' to trigger the swap. With the message I'm practically not doing anything but looking at my buddy...
UPDATE ====== This thread seems pretty relevant to my interests: https://forums.alliedmods.net/showthread.php?t=250165 But I have no idea how to use the 'task'. Are the referring to set_task()?... |
Re: [HELP] HUD Message When Looking at Player
Ham_ObjectCaps or PreThink
|
Re: [HELP] HUD Message When Looking at Player
PHP Code:
|
Re: [HELP] HUD Message When Looking at Player
Quote:
|
Re: [HELP] HUD Message When Looking at Player
Quote:
PHP Code:
|
Re: [HELP] HUD Message When Looking at Player
Works! Thanks both of you! Although I didn't use "public Event_StatusValueHide(id)" since I figured the HUD message had a timer of its own. Will there be any consequences not using that?...
|
| All times are GMT -4. The time now is 18:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.