Raised This Month: $ Target: $400
 0% 

Multilang Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 04-10-2011 , 08:50   Multilang Chat
Reply With Quote #1

So I have this in my code:

PHP Code:
#define DEAD_TEXT "*DEAD*"

ColorChat(idRED"^x03(Terrorist) %s :  %s" NameszMsg);

ColorChat(idRED"^x03%s(Terrorist) %s :  %s"DEAD_TEXTNameszMsg);

ColorChat(0RED"^x03%s %s :  %s"DEAD_TEXTNameszMsg); 
Basically whole chat of the admins are replaced, but how can I support Multilang, so not in all languages it is Dead or Terrorist or whatever. I saw this and wanted to know if this is possible todo and how?

"Cstrike_Chat_CT" "(Counter-Terrorist) %s1 : %s2"
"Cstrike_Chat_T" "(Terrorist) %s1 : %s2"
"Cstrike_Chat_CT_Dead" "*DEAD*(Counter-Terrorist) %s1 : %s2"
"Cstrike_Chat_T_Dead" "*DEAD*(Terrorist) %s1 : %s2"
"Cstrike_Chat_Spec" "(Spectator) %s1 : %s2"
"Cstrike_Chat_All" "%s1 : %s2"
"Cstrike_Chat_AllDead" "*DEAD* %s1 : %s2"
"Cstrike_Chat_AllSpec" "*SPEC* %s1 : %s2"
bibu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-10-2011 , 08:52   Re: Multilang Chat
Reply With Quote #2

You would have better to hook SayText msg.

For translations, look on here : http://forums.alliedmods.net/showthread.php?t=153034
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-10-2011 , 09:58   Re: Multilang Chat
Reply With Quote #3

I don't understand SayText msg at all, that's why I made it by hooking say.

With your translation thread, I need to replace the whole color chat stuff with your new one right, so that I can have colored ML with id=0.
bibu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-10-2011 , 10:14   Re: Multilang Chat
Reply With Quote #4

No, you will hook each message sent, so when a player writes something, you gonna catch as many messages as they are receivers, all you have to do then, don't bother about what was said, just alter the unformatted message, so replace #Cstrike_Chat_CT for example with "Admin (Counter-Terrorist) %s1 : %s2", and that's all (you can proceed ML with receiver id).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 20:09.


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