Jump to content

Kafka

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by Kafka

  1. Ok, thanks, now it works
  2. Ok, now it became visible for a very short time, and then dissapear.
  3. Sorry, I don't understand you Can you give an example?
  4. Hello, I've got a problem. I'd like to create 3D line, but I can't. This is my script (clientside): function makeLineAppear() addEventHandler("onClientRender", getRootElement(), createLine) end function createLine ( ) dxDrawLine3D ( "1396.0999755859", "-2577.8999023438", "13", "2068.6000976563", "-2577.8999023438", "13", tocolor ( 0, 255, 0, 230 ), 2) end addCommandHandler("test", makeLineAppear) /debugscript 3 doesn't show anything.
  5. So, what do you think, SA-MP already have it, we can't be worse: I don't know, maybe not exacly name like in SA-MP, but propably. dxDrawText3D or create3DText I don't know, and I leave a chooise for you
  6. Changing textspeech in TextSpeech nothing changed. I see, that is difficult, so start with something easier: saying the text and player nick (ex. Welcome Kafka!) after joining the server (So far, the script didn't say anything -.-). Thanks JR10, I'll read more about Lua .
  7. It is full script. If you want to see TextSpeech resource, here it is: Client: --// --|| TextSpeech Resource --|| Author: x0rh4x --|| Date: 15th October 2011 --|| Time: 04:45 UTC+2 --\\ --// --|| [url=http://translate.google.com/translate_tts?tl=en&q=Hello]http://translate.google.com/translate_tts?tl=en&q=Hello[/url] World! --|| Limited to 100 chars by Google --\\ addEvent("speak", true); addEventHandler("speak", root, function(text, lang) if(type(text) == "string" and type(lang) == "string") then return playSound("http://translate.google.com/translate_tts?tl="..lang.."&q="..text, false) ~= false; end return false; end) --// --|| Syntax: bool speak(string text, string lang) --|| --|| Required Arguments: --|| - text: Limited to 100 chars. --|| - lang: Language code E.g. "en", "de", ... (Note: not every language is supported.) --|| --|| Returns: --|| - Returns true if the sound gets played, false if invalid arguments were specified. --\\ function speak(text, lang) if(text and type(text) == "string" and type(lang) == "string") then local cancelled = triggerEvent("onClientSpeech", root, text, lang); if(not cancelled) then return triggerEvent("speak", root, text, lang); end end return false; end Server: --// --|| TextSpeech Resource --|| Author: x0rh4x --|| Date: 15th October 2011 --|| Time: 04:45 UTC+2 --\\ --// --|| Syntax: bool speak(string text, string lang [, triggerFor]) --|| --|| Required Arguments: --|| - text: Limited to 100 chars. --|| - lang: Language code E.g. "en", "de", ... (Note: not every language is supported.) --|| - triggerFor: By default this is the root element. --|| --|| Returns: --|| - Returns true if the event was triggered sucessfully. --\\ function speak(text, lang, triggerFor) if(text and type(text) == "string" and type(lang) == "string") then if(triggerFor == nil) then triggerFor = root end if(isElement(triggerFor) and getElementType(triggerFor) == "player" or getElementType(triggerFor) == "root") then local cancelled = triggerEvent("onSpeech", triggerFor, text, lang); if(not cancelled) then return triggerClientEvent(triggerFor, "speak", resourceRoot, text, lang); end end end return false; end Meta: <meta> <info name="TextSpeech" description="TextToSpeech" author="x0rh4x" type="script" version="1.0"/> <script src="server.lua" type="server"/> <script src="client.lua" type="client"/> <export function="speak"/> <export function="speak" type="client"/> </meta>
  8. I'm rather looking for ready-made solution, but if it would help.. (I don't know, is it that script, which hadn't show errors, because I deleted that) function playerChat() local message = () exports.textspeech:speak( ..message, en ) //Here little edit, error in pasting outputChatBox ( "Message:" ..message.. "." ) end addEventHandler( "onPlayerChat", playerChat ) Sth like it.
  9. Hello, I've got a question: How to get, what did player said and send it to TextSpeech resource? I tried to write some scripts, but every failed - text wasn't readed and /debugscript 3 haven't show any errors. If i made any language mistakes, excuse me. Thanks in advance - Kafka.
  10. Kafka

    Item attaching

    BIG thanks It works! I'm gonna work on it now. Thanks again
  11. Kafka

    Item attaching

    I don't undestand... Line 5: exports.bone_attach:attachElementToBone(przedmiot,gracz,12,0,0,0,0,0,0)
  12. Kafka

    Item attaching

    Hmm.. It still doesn't work
  13. Kafka

    Item attaching

    Hello, I've got a problem. I downloaded "bone_attach" resource, and i wanted to do little script, which will attach item when I type a command "/przyczep". I created a script, but it doesn't work. Please, help me (and don't say, that I'm noob, I'm not experienced scripter. Remember your first problem.) meta.xml: "Kafka" version="1.0.0" name="Przedmioty" description="Przyczepianie przedmiotow" type="script" /> przedmioty.lua local przedmiot = createObject( 1210,0,0,0 ) local gracz = getLocalPlayer function przyczepPrzedmiot exports.bone_attach:attachElementToBone(przedmiot,gracz,12,0,0,0,0,0,0) end addCommandHandler ( "przyczep", przyczepPrzedmiot ) And one thing more, I DON'T want attach script from "briefcaserace". Thanks
×
×
  • Create New...