Hey guys.
I am trying to customise the way SM admin chat is printed.
PHP Code:
void SendChatToAll(int client, const char[] message)
{
char nameBuf[MAX_NAME_LENGTH];
for (int i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i) || IsFakeClient(i))
{
continue;
}
FormatActivitySource(client, i, nameBuf, sizeof(nameBuf));
PrintToChat(i, "\x04(ADMIN) %s: \x01%s", nameBuf, message);
}
}
void DisplayCenterTextToAll(int client, const char[] message)
{
char nameBuf[MAX_NAME_LENGTH];
for (int i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i) || IsFakeClient(i))
{
continue;
}
FormatActivitySource(client, i, nameBuf, sizeof(nameBuf));
PrintCenterText(i, "%s: %s", nameBuf, message);
}
}
void SendChatToAdmins(int from, const char[] message)
{
int fromAdmin = CheckCommandAccess(from, "sm_chat", ADMFLAG_CHAT);
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && (from == i || CheckCommandAccess(i, "sm_chat", ADMFLAG_CHAT)))
{
PrintToChat(i, "\x04(%sADMIN CHAT) %N: \x01%s", fromAdmin ? "" : "TO ", from, message);
}
}
}
I am wanting to change the "(ALL)" to "(ADMINS)" but use the old Mani Admin Plugin admin chat color for both the "(ADMIN)" tag, admin name and the message but I don't know what the x0 code is for the lightgreen text color.
Could I get some help with this?
EDIT: I am unable to compile the script. Could someone who do this for me and enter in the correct light green x0 color code into this part of the script:
PHP Code:
void SendChatToAll(int client, const char[] message)
{
char nameBuf[MAX_NAME_LENGTH];
for (int i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i) || IsFakeClient(i))
{
continue;
}
FormatActivitySource(client, i, nameBuf, sizeof(nameBuf));
PrintToChat(i, "\x*LIGHTGREENCOLORHERE*(ADMIN) %s: \x*SAME COLOR HERE*%s", nameBuf, message);
}
}
Thank you.