i dont know anything about Sourcemod.
i just try it but didnt work.
http://forums.alliedmods.net/showthread.php?t=80584
Code:
//Hud Custom Message 1.2 [With HUD]
#include <sourcemod>
#include <sdktools>
//new Handle:Title
new Handle:MessageTime
new Handle:MessageX
new Handle:MessageY
new Handle:MessageRed
new Handle:MessageGreen
new Handle:MessageBlue
new Handle:MessageAlpha
new Handle:MessageEffect
new Handle:MessageFadeIn
new Handle:MessageFadeOut
public Plugin:myinfo =
{
name = "Custom Messages",
author = "[GR]Nick_6893{A}",
description = "Make a custom hud message using console.",
version = "1.2",
url = "www.sourcemod.net"
}
public OnPluginStart()
{
RegAdminCmd("sm_mess", Command_Mess, ADMFLAG_RCON, "Makes a message in the center of screen.");
// Title = CreateConVar("sm_mess_title", "Console", "Sets up the Word/Words before the colon.");
MessageTime = CreateConVar("sm_mess_time", "3.5", "Sets up the Time for the message to show.");
MessageX = CreateConVar("sm_mess_x", "-1.0", "Sets up the X for the message to show.");
MessageY = CreateConVar("sm_mess_y", "0.3", "Sets up the Y for the message to show.");
MessageRed = CreateConVar("sm_mess_red", "255", "Sets up the Red for the message to show.");
MessageGreen = CreateConVar("sm_mess_green", "255", "Sets up the Green for the message to show.");
MessageBlue = CreateConVar("sm_mess_blue", "255", "Sets up the Blue for the message to show.");
MessageAlpha = CreateConVar("sm_mess_alpha", "255", "Sets up the Alpha for the message to show.");
MessageEffect = CreateConVar("sm_mess_effect", "0", "Sets up the Effect for the message to show.");
MessageFadeIn = CreateConVar("sm_mess_fadein", "0.1", "Sets up the Fade in Time for the message to show.");
MessageFadeOut = CreateConVar("sm_mess_fadeout", "0.2", "Sets up the Fade out Time for the message to show.");
}
public Action:Command_Mess(Client, Arguments)
{
if(Arguments < 1)
{
PrintToConsole(Client, "[SM] Usage: sm_mess <message>");
return Plugin_Handled;
}
decl AllPlayers;
AllPlayers = GetMaxClients();
for(new A = 1; A <= AllPlayers; A++)
{
if(IsClientConnected(A) && IsClientInGame(A))
{
// new String:Header[75];
new String:Message[85];
new messtime = GetConVarInt(MessageTime);
new messx = GetConVarInt(MessageX);
new messy = GetConVarInt(MessageY);
new messred = GetConVarInt(MessageRed);
new messgreen = GetConVarInt(MessageGreen);
new messblue = GetConVarInt(MessageBlue);
new messalpha = GetConVarInt(MessageAlpha);
new messeffect = GetConVarInt(MessageEffect);
new messfadein = GetConVarInt(MessageFadeIn);
new messfadeout = GetConVarInt(MessageFadeOut);
// GetConVarString(Title, Header, 75);
GetCmdArgString(Message, 85);
// SetHudTextParams(-1.0, 0.3, float(messtime), 255, 255, 255, 255, 0, float(messtime), 0.3, 0.3);
SetHudTextParams(float(messx), float(messy), float(messtime), messred, messgreen, messblue, messalpha, messeffect, float(messtime), float(messfadein), float(messfadeout));
// ShowHudText(A, -1, "%s: %s", Header, Message);
ShowHudText(A, -1, "%s", Message);
}
}
return Plugin_Handled;
}
i set the X -1 and Y 0.3 but didnt work.
it showing like Y 1.0
and one more ask, how can i add the player only?
ex. sm_mess @red hello?
ex2. sm_mess 2 you are the first one!
maybe, someone make script like that for me. D;