Been having a little trouble with getting the hostname and displaying it in chat. More specifically it seems to display differently in different mods:
HL2DM appends an '=' to the front of the hostname
TF2 doesn't
L4D just displays an '=' without displaying the hostname
I'm using an old bit of code I found somewhere:
PHP Code:
public Action:Command_Host(client, args)
{
new String:hostname[128];
new Handle:hhost;
hhost = FindConVar("hostname");
GetConVarString(hhost,hostname,sizeof(hostname));
PrintToChat(client, "\x04%s", hhost);
}
Not sure if this is my problem or differneces between mods. Also the hostname displays in the mods default colour, although the '=', when displayed, is the right colour.