Jump to content

Search the Community

Showing results for tags 'false'.

  • 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 2 results

  1. I made this: -- All other functions and GUI creation. -- [...] -- Created button called "fbumper". local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) -- Everything else... It works. Then I wanted to have the button switch between true to false when clicked. Something like: local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) elseif getVehicleComponentVisible(theVeh7) == "false" then setVehicleComponentVisible(theVeh7, "bump_front_dummy", true) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) guiSetVisible (vehmod, false) It doesn't work correctly. It sets it invisible, but it doesn't return the state to visible. I also thought about using the setVehicleComponentVisible (not setVehicleComponentVisible) to make it a little bit more compact. I'm using a setEngineState script to help myself, but I don't know how to use it with these arguments. DB 3 throws nothing. What am I doing wrong?
  2. 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...