Anybody interested in testing can use this code:
Anything past .7 on the X axis seems to be cut off
Code:
#include <sourcemod>
#include <sdktools>
public void OnPluginStart()
{
RegConsoleCmd("sm_hudmessage", testmessage);
}
public Action testmessage(int client, int args)
{
char arg1[64];
char arg2[64];
GetCmdArg(1, arg1, sizeof(arg1));
GetCmdArg(2, arg2, sizeof(arg2));
int ent = CreateEntityByName("game_text");
DispatchKeyValue(ent, "channel", "1");
DispatchKeyValue(ent, "color", "255 255 255");
DispatchKeyValue(ent, "color2", "0 0 0");
DispatchKeyValue(ent, "effect", "0");
DispatchKeyValue(ent, "fadein", "1.5");
DispatchKeyValue(ent, "fadeout", "0.5");
DispatchKeyValue(ent, "fxtime", "0.25");
DispatchKeyValue(ent, "holdtime", "5.0");
DispatchKeyValue(ent, "message", "this is a test message\nThis is a new line test");
DispatchKeyValue(ent, "spawnflags", "0");
DispatchKeyValue(ent, "x", arg1);
DispatchKeyValue(ent, "y", arg2);
DispatchSpawn(ent);
SetVariantString("!activator");
AcceptEntityInput(ent,"display",client);
return Plugin_Handled;
}