Jump to content

Search the Community

Showing results for tags 'triggerclientevent'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Member Title





Found 6 results

  1. Всем привет! Я решил сделать телефон. Как мы знаем, чтобы создать картинку на экране, нам нужен клиент. Но, так как основная часть на сервере, нужно вызвать клиентскую функцию на сервере. Вроде как сделал всё правильно (скриншоты можете видеть ниже), но не работает: картинка не появляется. В консоле никаких ошибок не выводится. Можете, пожалуйста, помочь с этой ошибкой? Сервер Клиент
  2. (Sorry if the text contains errors, I'm Russian). Hello! I decided to make a telephone. As we know, in order to create a picture on the screen, we need a client. But, since the main part is on the server, you need to call the client function on the server. It seems like I did everything right (you can see the screenshots below), but it does not work: the picture does not appear. No errors are displayed in the console. Can you please help with this error? Server Client
  3. I am done. I've made a function to display text on elements, on server-side, and I wanted to trigger client event, but what? Doesn't triggering. Look: allElems = 0 function dxDrawTextOnElem(element, text, height, distance, r, g, b, alpha, size, font) allElems = allElems + 1 triggerClientEvent("dxDraw", resourceRoot, element, text, height or 0, distance or 20, r or 255, g or 0, b or 0, alpha or 255, size or 1, font or "arial", allElems) end Boom, client-side script: --Ofcourse, I've created all tables + in "onClientRender" I put outputChatBox(), outputs "{}" (because tables are empty) addEvent("dxDraw", true) addEventHandler("dxDraw", resourceRoot, function(element, text, height, distance, r, g, b, alpha, size, font, k) local i = table.find(elements, element) --table.find(pattern, s) if i then elements[i] = element texts[i] = text heights[i] = height distances[i] = distance rs[i] = r gs[i] = g bs[i] = b alphas[i] = alpha sizes[i] = size fonts[i] = font else elements[k] = element texts[k] = text heights[k] = height distances[k] = distance rs[k] = r gs[k] = g bs[k] = b alphas[k] = alpha sizes[k] = size fonts[k] = font end end) addEventHandler("onClientRender", root, function() for i, text in ipairs(texts) do dxDrawTextOnElement(elements[i], text, heights[i], distances[i], rs[i], gs[i], bs[i], alphas[i], sizes[i], fonts[i]) end end) Jesus, I'm done with it. Sorry for asking a similar thing, but it's really difficult for me. For real, I'm like doing it second time, still fails.
  4. Whenever I go to do a dx panel this error appears ... What can I do to correct? "ERROR: Server triggered clientside event "eventoabrir", but event is not added clientside" -------------------CLIENT-------------------------- function abrir (_,state) if painel == false then showCursor(true) addEventHandler("onClientRender", root, Pdx) painel = true else showCursor(false) removeEventHandler("onClientRender", root, Pdx) painel = false end end addEvent("abrir", true) addEventHandler("abrir", root , abrir) ------------------SERVER-------------------------- local abrir = "painel" function showPanellr(thePlayer) triggerClientEvent(root, "abrir", thePlayer) end addEventHandler("onMarkerHit", mrkInicio, showPanellr)
  5. Is it possible to prevent trggerServerEvent and TriggerClientEvent from triggering other resources? Thanks
  6. Hello! I want to play a sound effect on the player's location, when he typed the command in, but my script is just not working, can somebody help me? Server: function pocsomoccseLejatszas() triggerClientEvent (getRootElement(), pocsomoccse) end addCommandHandler ("pocsomoccse", pocsomoccseLejatszas) Client: function pocsomoccseHangLejatszas() local jatekosX, jatekosY, jatekosZ = getElementPosition(localPlayer) local pocsomoccseHangEffekt = playSound3D("pocsomoccse.mp3", jatekosX, jatekosY, jatekosZ, false) end addEvent ("pocsomoccse", true) addEventHandler ("pocsomoccse", getRootElement(), pocsomoccseHangLejatszas) Meta: <meta> <info type="script" version="1.0.0"></info> <script src="codeC.lua" type="client"></script> <script src="codeC2.lua" type="client"></script> <script src="pocsomoccse_c.lua" type="client"></script> <script src="pocsomoccse_s.lua" type="server"></script> <file src="italy.mp3"></file> <file src="inferno.mp3"></file> <file src="jinglejingle.mp3"></file> <file src="alarm.mp3"></file> <file src="peddiendre.mp3"></file> <file src="putin_putout.mp3"></file> <file src="pocsomoccse.mp3"></file> </meta> Sorry for the Hungarian language.
  • Create New...