View Full Version : HUD messages.
How thay do that. :oops:
see Attach File
Server Tf2 and L4D want to see some sample plugins.
Screenshot of below code in action (http://users.alliedmods.net/~bl4nk/cp_dustbowl0050.jpg)
#pragma semicolon 1
#include <sourcemod>
public OnPluginStart()
{
RegConsoleCmd("test", asdf);
}
public Action:asdf(client, args)
{
new Handle:hHudText = CreateHudSynchronizer();
SetHudTextParams(-1.0, 0.2, 5.0, 255, 0, 0, 255);
ShowSyncHudText(client, hHudText, "This is a test");
CloseHandle(hHudText);
return Plugin_Handled;
}If you use SetHudTextParamsEx, you can fade the text from one color to another.
Look into the API Reference (http://docs.sourcemod.net/api/). Keyword for searching is "hud":
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 ))
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?
Look at the prototype (http://docs.sourcemod.net/api/index.php?fastload=show&id=842&) 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).
hey that looks like its from my server :P
hey that looks like its from my server :P
yep ;)
kiki33hun
08-17-2013, 04:01
Its workings CSS?
No, the closest CS:S has is KeyHintText, which is...difficult to position.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.