Raised This Month: $12 Target: $400
 3% 

How to colored translate phrase?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xSaG
Junior Member
Join Date: Sep 2018
Location: Romānia
Old 09-22-2018 , 22:48   How to colored translate phrase?
Reply With Quote #1

How to colored translate phrase?

Exemple pls, I'm a beginner
xSaG is offline
Cruze
Veteran Member
Join Date: May 2017
Old 09-23-2018 , 01:07   Re: How to colored translate phrase?
Reply With Quote #2

Code:
#include <colorvariables>
Code:
 CPrintToChat
Compiled .sp file should have these for {red}, {green}, {blue} etc. to work in translations phrases
__________________
Taking paid private requests! Contact me
Cruze is offline
xSaG
Junior Member
Join Date: Sep 2018
Location: Romānia
Old 09-23-2018 , 07:25   Re: How to colored translate phrase?
Reply With Quote #3

Quote:
Originally Posted by Cruze View Post
Code:
#include <colorvariables>
Code:
 CPrintToChat
Compiled .sp file should have these for {red}, {green}, {blue} etc. to work in translations phrases
No work...

Add #include <colorvariables> in sbpp_comms.sp and change ShowActivity2 in CShowActivity2.

And add {red},{gree} in traslate, not work

Last edited by xSaG; 09-23-2018 at 07:58.
xSaG is offline
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
Reply


Thread Tools
Display Modes

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 03:34.


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