Search the Community

Showing results for tags 'triggerclientevent'.

More search options

  • 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
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
    • 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
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start







Found 4 results

  1. Hi, I have a little problem with my script. I wanted to use server variable in client-side script, so I used trigger server and client event, but unfortunately, it didn't work. Do you know why? PS: This script has to display variable characterName in grid row. SERVER SIDE SCRIPT: function getCharacterName(characterName) local characterName = 'James' triggerClientEvent ( thePlayer, 'getCharName', thePlayer, characterName ) end addEvent('getCharacterName', true) addEventHandler('getCharacterName', root, getCharacterName) CLIENT-SIDE SCRIPT: function openCharacterMenu(characterName) menu = guiCreateWindow(0.5, 0.5, 0.2, 0.25, 'Characters', true) charactersList = guiCreateGridList(0.5, 0.5, 0.4, 0.6, true, menu) charactersColumn = guiGridListAddColumn(charactersList, 'Characters', 0.6) charactersRow = guiGridListAddRow(charactersList, 'No characters found') guiGridListSetItemText(charactersList, charactersColumn, charactersRow, characterName, false, false) end addEvent('getCharName', true) addEventHandler('login.success', localPlayer, openCharacterMenu) I see one error in client debug: Bad argument @ 'gu'iGridListSetItemText [expected string at argument 4 got, nil] Event 'login.success' opens up characters gui
  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. Xwad


    Is it possible to prevent trggerServerEvent and TriggerClientEvent from triggering other resources? Thanks
  4. rusztamas

    triggerClientEvent problem!

    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.