Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*=================================================================
- _ ____ _____ __ __
- (_) _ \ ___ |_ _|__ __ _| \/ |
- | | |_) / __| | |/ _ \/ _` | |\/| |
- | | __/\__ \ | | __/ (_| | | | |
- |_|_| |___/ |_|\___|\__,_|_| |_|
- Created by Bruno da Silva
- www.ips-team.blogspot.com
- Working only in SA:MP 0.3D
- =================================================================*/
- new
- languageCodes[][][] =
- {
- {"AFRIKAANS", "af"},
- {"ALBANIAN", "sq"},
- {"AMHARIC", "am"},
- {"ARABIC", "ar"},
- {"ARMENIAN", "hy"},
- {"AZERBAIJANI", "az"},
- {"BASQUE", "eu"},
- {"BELARUSIAN", "be"},
- {"BENGALI", "bn"},
- {"BIHARI", "bh"},
- {"BRETON", "br"},
- {"BULGARIAN", "bg"},
- {"BURMESE", "my"},
- {"CATALAN", "ca"},
- {"CHEROKEE", "chr"},
- {"CHINESE", "zh"},
- {"CHINESE_SIMPLIFIED", "zh-CN"},
- {"CHINESE_TRADITIONAL", "zh-TW"},
- {"CORSICAN", "co"},
- {"CROATIAN", "hr"},
- {"CZECH", "cs"},
- {"DANISH", "da"},
- {"DHIVEHI", "dv"},
- {"DUTCH", "nl"},
- {"ENGLISH", "en"},
- {"ESPERANTO", "eo"},
- {"ESTONIAN", "et"},
- {"FAROESE", "fo"},
- {"FILIPINO", "tl"},
- {"FINNISH", "fi"},
- {"FRENCH", "fr"},
- {"FRISIAN", "fy"},
- {"GALICIAN", "gl"},
- {"GEORGIAN", "ka"},
- {"GERMAN", "de"},
- {"GREEK", "el"},
- {"GUJARATI", "gu"},
- {"HAITIAN_CREOLE", "ht"},
- {"HEBREW", "iw"},
- {"HINDI", "hi"},
- {"HUNGARIAN", "hu"},
- {"ICELANDIC", "is"},
- {"INDONESIAN", "id"},
- {"INUKTITUT", "iu"},
- {"IRISH", "ga"},
- {"ITALIAN", "it"},
- {"JAPANESE", "ja"},
- {"JAVANESE", "jw"},
- {"KANNADA", "kn"},
- {"KAZAKH", "kk"},
- {"KHMER", "km"},
- {"KOREAN", "ko"},
- {"KURDISH", "ku"},
- {"KYRGYZ", "ky"},
- {"LAO", "lo"},
- {"LATIN", "la"},
- {"LATVIAN", "lv"},
- {"LITHUANIAN", "lt"},
- {"LUXEMBOURGISH", "lb"},
- {"MACEDONIAN", "mk"},
- {"MALAY", "ms"},
- {"MALAYALAM", "ml"},
- {"MALTESE", "mt"},
- {"MAORI", "mi"},
- {"MARATHI", "mr"},
- {"MONGOLIAN", "mn"},
- {"NEPALI", "ne"},
- {"NORWEGIAN", "no"},
- {"OCCITAN", "oc"},
- {"ORIYA", "or"},
- {"PASHTO", "ps"},
- {"PERSIAN", "fa"},
- {"POLISH", "pl"},
- {"PORTUGUESE", "pt"},
- {"PORTUGUESE_PORTUGAL", "pt-PT"},
- {"PUNJABI", "pa"},
- {"QUECHUA", "qu"},
- {"ROMANIAN", "ro"},
- {"RUSSIAN", "ru"},
- {"SANSKRIT", "sa"},
- {"SCOTS_GAELIC", "gd"},
- {"SERBIAN", "sr"},
- {"SINDHI", "sd"},
- {"SINHALESE", "si"},
- {"SLOVAK", "sk"},
- {"SLOVENIAN", "sl"},
- {"SPANISH", "es"},
- {"SUNDANESE", "su"},
- {"SWAHILI", "sw"},
- {"SWEDISH", "sv"},
- {"SYRIAC", "syr"},
- {"TAJIK", "tg"},
- {"TAMIL", "ta"},
- {"TATAR", "tt"},
- {"TELUGU", "te"},
- {"THAI", "th"},
- {"TIBETAN", "bo"},
- {"TONGA", "to"},
- {"TURKISH", "tr"},
- {"UKRAINIAN", "uk"},
- {"URDU", "ur"},
- {"UZBEK", "uz"},
- {"UIGHUR", "ug"},
- {"VIETNAMESE", "vi"},
- {"WELSH", "cy"},
- {"YIDDISH", "yi"},
- {"YORUBA", "yo"},
- {"UNKNOWN", " "}
- };
- getLanguage(language[])
- {
- for(new i = 0; i != sizeof(languageCodes); i++) {
- if(!strcmp(language, languageCodes[i][0], true)) {
- return i;
- }
- }
- return sizeof(languageCodes)-1;
- }
- SendClientAudioMessage(playerid, language[], texto[])
- {
- #if !defined MAX_SPEECH
- #define MAX_SPEECH 256
- #endif
- static
- string[MAX_SPEECH]
- ;
- format(string, MAX_SPEECH, "http://translate.google.com/translate_tts?tl=%s&q=%s", language, texto);
- return PlayAudioStreamForPlayer(playerid, string);
- }
- //
- // Thanks Robson to Post (Strong)
- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement