This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Solved Colors not working properly in CS:S


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
godzcsgo
Senior Member
Join Date: Jul 2017
Old 05-08-2024 , 13:52   Colors not working properly in CS:S
Reply With Quote #1

I am trying to modify the basechat script, and change the colors. I found a couple of threads on here listing the available color hex codes.

Code I have changed:
Code:
void SendChatToAdmins(int from, const char[] message)
{
	char szTag[32];
	CS_GetClientClanTag(from, szTag, sizeof(szTag));

	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)))
		{
			if (g_GameEngine == Engine_CSGO)
				PrintToChat(i, "\x07[STAFF ONLY] %s | %N : %s ", szTag, from, message);
			else
				PrintToChat(i, "\x07[STAFF ONLY] %s | %N : %s ", szTag, from, message);
		}
	}
}
But when using this in-game, the result is:
It's cutting off the "STAFF" part, aswell as the color is dark blue and not red as it should be.

Code:
 ONLY] [Owner] | painless : testing
I am new to scripting, and just asking for some guidance as to why this is not working properly.

Regards.

Solution:

Included multicolors, and used CPrintToChat and {darkred}

Last edited by godzcsgo; 05-08-2024 at 14:10. Reason: Solved
godzcsgo is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode