Search the Community

Showing results for tags 'triggerclientevent'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 4 results

  1. 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.
  2. 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)
  3. Is it possible to prevent trggerServerEvent and TriggerClientEvent from triggering other resources? Thanks
  4. 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.