Raised This Month: $12 Target: $400
 3% 

HUD messages.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
koshmel
Member
Join Date: Nov 2008
Old 04-18-2009 , 14:54   HUD messages.
Reply With Quote #1

How thay do that.
see Attach File
Server Tf2 and L4D want to see some sample plugins.
Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	3540
Size:	15.7 KB
ID:	40883  
koshmel is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 04-18-2009 , 15:30   Re: HUD messages.
Reply With Quote #2

Screenshot of below code in action

PHP Code:
#pragma semicolon 1

#include <sourcemod>

public OnPluginStart()
{
    
RegConsoleCmd("test"asdf);
}

public 
Action:asdf(clientargs)
{
    new 
Handle:hHudText CreateHudSynchronizer();
    
SetHudTextParams(-1.00.25.025500255);
    
ShowSyncHudText(clienthHudText"This is a test");
    
CloseHandle(hHudText);

    return 
Plugin_Handled;

If you use SetHudTextParamsEx, you can fade the text from one color to another.

Last edited by bl4nk; 04-18-2009 at 15:34.
bl4nk is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 04-18-2009 , 15:32   Re: HUD messages.
Reply With Quote #3

Look into the API Reference. Keyword for searching is "hud":
Code:
CreateHudSynchronizer
SetHudTextParams
SetHudTextParamsEx
ShowSyncHudText
ClearSyncHud
ShowHudText
And as far as I know HUD examples can be found into SprayTracer plugin.

upd:
nevermind, bl4nk showed you it ))
__________________
For admins: My plugins

For developers: Colors library

Last edited by exvel; 04-18-2009 at 15:36.
exvel is offline
Send a message via ICQ to exvel
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 04-18-2009 , 22:29   Re: HUD messages.
Reply With Quote #4

I have a question. Is it the first numbers after SetHudTextParams(-1.0, 0.2, 5.0, 255, 0, 0, 255);

that are used to move the location of text around? Which number or numbers do that. Are those 3 the x,y,z axis?



retsam is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 04-19-2009 , 00:19   Re: HUD messages.
Reply With Quote #5

Look at the prototype for the function. It tells you exactly what everything is.

The first two params are x and y (there is no z as you're drawing on a 2D plane - your screen).
bl4nk is offline
voogru
Inspector Javert
Join Date: Oct 2004
Old 04-19-2009 , 02:33   Re: HUD messages.
Reply With Quote #6

hey that looks like its from my server
voogru is offline
koshmel
Member
Join Date: Nov 2008
Old 04-19-2009 , 05:41   Re: HUD messages.
Reply With Quote #7

Quote:
Originally Posted by voogru View Post
hey that looks like its from my server
yep ;)
koshmel is offline
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 08-17-2013 , 04:01   Re: HUD messages.
Reply With Quote #8

Its workings CSS?
__________________
kiki33hun is offline
necavi
Veteran Member
Join Date: Sep 2010
Old 08-17-2013 , 04:52   Re: HUD messages.
Reply With Quote #9

No, the closest CS:S has is KeyHintText, which is...difficult to position.
necavi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:03.


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