• Russian Hieroglyphs
    12 replies, posted
If I write in my addon sound.PlayURL("http://translate.google.com/translate_tts?ie=UTF-8&tl=ru-RU&client=tw-ob&q=test", "", function() end) all work good But if i write sound.PlayURL("http://translate.google.com/translate_tts?ie=UTF-8&tl=ru-RU&client=tw-ob&q=тест", "", function() end) dubbing turns into hieroglyphs
Use this is local function httpUrlEncode(text) -- wiremod local ndata = string.gsub(text, "[^%w _~%.%-]", function(str) local nstr = string.format("%X", string.byte(str)) return "%"..((string.len(nstr) == 1) and "0" or "")..nstr end) return string.gsub(ndata, " ", "+") end
Что-то не ошибки полезли Я правильно её использую? local soundurl = "http://translate.google.com/translate_tts?ie=UTF-8&tl=ru-RU&client=tw-ob&q=" .. suburl if GetConVarNumber("tts_3d") == 1 and ply ~= LocalPlayer() then local vol = 1 if ply:GetPos():Distance(LocalPlayer():GetPos()) < 90 then vol = 0.4 elseif ply:GetPos():Distance(LocalPlayer():GetPos()) < 250 then vol = 1 else vol = 2 end TTS_SOUNDS = TTS_SOUNDS or {} local id = #TTS_SOUNDS + 1 function soundStuff(chan) TTS_SOUNDS[id] = {channel = chan, ply = ply, volume = vol} chan:SetPos(ply:GetPos() + Vector(0, 0, 64)) chan:SetVolume(vol) timer.Create("Sound" .. id, 60, 1, function() table.remove(TTS_SOUNDS, 1) end) end sound.PlayURL(httpUrlEncode(soundurl), "3d", soundStuff) else sound.PlayURL(httpUrlEncode(soundurl), "", function() end) end
englisch?
I have already helped people, thank you.
you HAVE to speak english here
Maybe, maybe.
False, right now. Its in the rules. go read them
This is an English forum. Use that please
ок
Lmao
Guys have a point though. You don't see me speaking around Slavic confusing everyone ROFL.  ​
Do not flood the topic please, anglisphobes
Sorry, you need to Log In to post a reply to this thread.