AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   HUD messages. (https://forums.alliedmods.net/showthread.php?t=90458)

koshmel 04-18-2009 14:54

HUD messages.
 
1 Attachment(s)
How thay do that. :oops:
see Attach File
Server Tf2 and L4D want to see some sample plugins.

bl4nk 04-18-2009 15:30

Re: HUD messages.
 
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.

exvel 04-18-2009 15:32

Re: HUD messages.
 
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 ))

retsam 04-18-2009 22:29

Re: HUD messages.
 
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?




bl4nk 04-19-2009 00:19

Re: HUD messages.
 
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).

voogru 04-19-2009 02:33

Re: HUD messages.
 
hey that looks like its from my server :P

koshmel 04-19-2009 05:41

Re: HUD messages.
 
Quote:

Originally Posted by voogru (Post 809116)
hey that looks like its from my server :P

yep ;)

kiki33hun 08-17-2013 04:01

Re: HUD messages.
 
Its workings CSS?

necavi 08-17-2013 04:52

Re: HUD messages.
 
No, the closest CS:S has is KeyHintText, which is...difficult to position.


All times are GMT -4. The time now is 23:53.

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