AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Multilang Chat (https://forums.alliedmods.net/showthread.php?t=154558)

bibu 04-10-2011 08:50

Multilang Chat
 
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"

ConnorMcLeod 04-10-2011 08:52

Re: Multilang Chat
 
You would have better to hook SayText msg.

For translations, look on here : http://forums.alliedmods.net/showthread.php?t=153034

bibu 04-10-2011 09:58

Re: Multilang Chat
 
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.

ConnorMcLeod 04-10-2011 10:14

Re: Multilang Chat
 
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).


All times are GMT -4. The time now is 20:09.

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