View Single Post
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 05-28-2019 , 03:53   Re: Colorchat ^3 showing wrong team color
Reply With Quote #27

here is simple example
Code:
public handleSayText(msgId, msgDest, msgEnt,item)
{
	new id = get_msg_arg_int(1);
	if(is_user_connected(id))
	{
		new szTmp[256],
		szTmp2[256];
		
		get_msg_arg_string(2, szTmp, charsmax(szTmp));
		
		new szPrefix[64]
		formatex(szPrefix,charsmax( szPrefix ),"^x04[%s]^x03%s:^x04%s",g_iItems[ Player_Prefix ], szName, szTmp)			
		if(!equal(szTmp, "#Cstrike_Chat_All"))
		{
			add(szTmp2, charsmax(szTmp2), szPrefix);
			add(szTmp2, charsmax(szTmp2), " ");
			add(szTmp2, charsmax(szTmp2), szTmp);
		}
		else
		{
			add(szTmp2, charsmax(szTmp2), szPrefix);
			add(szTmp2, charsmax(szTmp2), "^x03 %s1^x01 :  %s2");
		}
		set_msg_arg_string(2, szTmp2);
	}
}

Last edited by husam124; 05-28-2019 at 03:59.
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124