so when player use other language then the english plugin auto translate it to english and show translated text to imm admin access only and if you can add translat for imm admin with language option and show his translated chat to all players is this possible if yes what is the price ?
/* ============================================= * - NAME: * + Chat Translation * * - DESCRIPTION: * + * + This plugin will take other players chat and translate it according- * + to the language the player has set in their amx_langmenu. * + * + -Example- * + There are 12 players speaking English (and have English set in amx_langmenu). * + There are 5 players speaking German (and have German set in amx_langmenu). * + There are 2 players speaking Spanish (and have Spanish set in amx_langmenu). * + The players in English will now see the German's/Spanish's chat in English. * + The players in German will now see the English's/Spanish's chat in German. * + The players in Spanish will now see the English's/German's chat in Spanish. * + * + -How it works- * + Before sending the chat message to each player it will first- * + send it to Google's Translation page (http://translate.google.com/translate_t). * + It will now retrieve the translated text and send it on to the selected player. * + If the sending and receiveing player are using the same language it won't use the translator. * + * + -Limitations- * + Only the languages supported in amx_langmenu are supported in this plugin. * + 2 languages in amx_langmenu are also not available on Google (Macedonian and l33t). * + Google Translations are not perfect. There will be errors sometimes of course. * + The HL1 engine cannot display some translated characters (that char will be left out of word). * + Serbian doesn't work very well so it's not included. * + * * * ------------- * Server cvars: * ------------- * - sv_langdomain ".com" * + Sets the domain in which to use on Google for the translation. * + You will want to set this to the domain closest to your server (make sure it exists first!). * + Example: United States will use .com (Default), United Kingdom will use .co.uk * * - sv_langmod "mod" * + Here you must set the mod name abbreviation you are using (Default: cs). * + Names to choose from: CS, TFC. * * - sv_translatefile "URL" * + This cvar allows you to enter the URL to the ChatTranslation.php file. * + The closer the URL is to your game server the better. * + If you set this cvar it will use the ChatTranslation.php file before/after translating. * + The ChatTranslation.php file is good to use so it can fix non-english characters. * + You can host the ChatTranslation.php yourself, it's contained in the zip file. * * * ---------- * Changelog: * ---------- * Version 1.0 ( 05-03-2009 ) * -- Initial release. * * Version 1.1 ( 05-03-2009 ) * -- Added support for Team Fortress Classic. * -- Added the sv_langmod cvar for mod support. * * Version 1.2 ( 05-06-2009 ) * -- Fixed quotes cutting off the sentence. * -- The amx_langmenu will pop-up if client doesn't have a language set. * * Version 1.3 ( 05-08-2009 ) * -- Fixed some text display when a client doesn't select a language. * -- Fixed names displaying incorrectly in TFC if name used certain chars. * * Version 2.0 ( 05-09-2009 ) * -- Fixed the menu from displaying before player fully spawned. * -- Removed Serbian from the translations as it doesn't work well. * -- Added the sv_translatefile cvar, see the cvar section to see how it works. * */
/* URL to the php script */ new szTranslateFile[256]; register_cvar("sv_translatefile", "http://hldevs.com/ChatTranslation/ChatTranslation.php", FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY); get_cvar_string("sv_translatefile", szTranslateFile, sizeof(szTranslateFile)-1);
/* If players don't have a language set it to english */ if(equal(szLangFrom, "")) copy(szLangFrom, sizeof(szLangFrom), "en"); else if(equal(szLangTo, "")) copy(szLangTo, sizeof(szLangTo), "en");
/* macedonian and l33t can't be translated, and Serbian doesn't work well at all */ if(equal(szLangFrom, "mk") || equal(szLangFrom, "ls") || equal(szLangFrom, "sr")) return PLUGIN_CONTINUE;
/* Change Brazil Portuguese to just Portuguese */ if(equal(szLangFrom, "bp")) copy(szLangFrom, sizeof(szLangFrom), "pt"); else if(equal(szLangTo, "bp")) copy(szLangTo, sizeof(szLangTo), "pt");
/* Change Czech's abbreviation to be correct with googles */ if(equal(szLangFrom, "cz")) copy(szLangFrom, sizeof(szLangFrom), "cs"); else if(equal(szLangTo, "cz")) copy(szLangTo, sizeof(szLangTo), "cs");
static szMsgType[64], szText[193];
if(g_iModNum == GAME_CS) { get_msg_arg_string(2, szMsgType, sizeof(szMsgType)); get_msg_arg_string(4, szText, sizeof(szText)); } else if(g_iModNum == GAME_TFC) { /* In TFC there is no msg type, but the players name is part of the msg */ static szRegex[256]; get_msg_arg_string(2, szText, sizeof(szText)); get_user_name(iSender, szMsgType, sizeof(szMsgType)); format(szRegex, sizeof(szRegex), "(.+?%s): (.+?)^n", szMsgType);
/* If players don't have a language set it to english */ if(equal(szLangFrom, "")) copy(szLangFrom, sizeof(szLangFrom), "EN"); else if(equal(szLangTo, "")) copy(szLangTo, sizeof(szLangTo), "EN");