View Single Post
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-03-2011 , 16:47   [INC] Director Hud Message
Reply With Quote #1

Director Hud Message
- last updated : 14 feb 2011

Ever wanted to display message like the hints messages in CS or on HLTV?
It should work on all mods. It uses basically the same params as set_hudmessage. (except for channel)
As side-note, the size is bigger than normal hud message and it can't be changed.

[IMG]http://img830.**************/img830/5036/hudt.th.png[/IMG]


│ Credits
MPNumB : original idea.
xPaw : original idea.
Exolent[jNr] : put the code in a .inc.

│ Limitations
Max message length : 128 characters.
You can show only 8 messages at once.

│ Developer Notes
The tip were in hud_spectator.cpp (line 526) in the HLSDK (client).

│ Functions
The following functions mimic the style of set_hudmessage() and show_hudmessage().

Code:
set_dhudmessage( red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 6.0, Float:holdtime = 3.0, Float:fadeintime = 0.1, Float:fadeouttime = 1.5, bool:reliable = false )
show_dhudmessage( index, const message[], any:... )
Attached Files
File Type: sma Get Plugin or Get Source (dhud_message_test.sma - 19677 views - 356 Bytes)
File Type: inc dhudmessage.inc (3.4 KB, 36520 views)
__________________

Last edited by Arkshine; 05-01-2013 at 05:37. Reason: Added a word about dhud size.
Arkshine is offline