Jump to content

Search the Community

Showing results for tags 'clickedelement'.

  • 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
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Hi! I want to get the clicked gui label's text, what I clicked on. There is a loop, so I can't add the label an own ID, or I don't know how can I do it. So I create labels in a loop(with the online players's name), and then under the onClientClick eventhandler, I retrieve the clickedElement type, but I get false. Everywhere I clicked, I get just false slot = 0 for v, character in ipairs(getElementsByType("player")) do local characterName = getElementData(character, "CharName") local name = tostring(characterName) slot = slot + 1 guiCreateLabel(440,230 + slot * (30) ,700,50,name,false) end function MemberClick ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if (button == "left" and state == "up") then local tipe = getElementType( clickedElement ) outputChatBox(tostring(tipe)) end end addEventHandler ( "onClientClick", root, MembeClick)
×
×
  • Create New...