View Single Post
xSaG
Junior Member
Join Date: Sep 2018
Location: Romānia
Old 09-23-2018 , 10:24   Re: How to colored translate phrase?
Reply With Quote #4

I've done it, but now I get the code FF4040, How can I eliminate it?




my CShowActivity2

Code:
stock CShowActivity2(client, const String:tag[], const String:message[], any:...) {

	CCheckTrie();
	if(client <= 0 || client > MaxClients) {
		ThrowError("Invalid client index %i", client);
	}
	if(!IsClientInGame(client)) {
		ThrowError("Client %i is not in game", client);
	}
	decl String:buffer[MAX_BUFFER_LENGTH], String:buffer2[MAX_BUFFER_LENGTH];
	SetGlobalTransTarget(client);
	Format(buffer, sizeof(buffer), "\x01%s", message);
	VFormat(buffer2, sizeof(buffer2), buffer, 4);
	CReplaceColorCodes(buffer2);
	strcopy(buffer, sizeof(buffer), tag);
	CReplaceColorCodes(buffer);
	ShowActivity2(client, buffer, "%s", buffer2);
	
}
xSaG is offline