Jump to content

Search the Community

Showing results for tags 'dx drawing'.

  • 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. Hello, I am creating a simple script to show a DX rectangle and text when a player hits a marker, it is for a vehicle system but I can do all but keep the DX box showing. It flashes up when you hit the marker then it just vanishes... I don't know why and I am struggling to understand why it just stays for a second then goes away, the code is below. Server --Make the markers CarSpawn = createMarker (1682.8740234375, -2326.5634765625, 12.5, "cylinder", 1.5, 0, 50, 150, 200) --When the player hits the marker trigger an event to create a GUI function FreeCars (hitElement, matchingDimension) if isElement(hitElement) and getElementType(hitElement) == "player" and matchingDimension and isPedOnGround ( hitElement ) then triggerClientEvent("showfreecar", hitElement)--This shows, then vanishes... else outputChatBox("You need to be on foot", hitElement, 230, 102, 103) end end addEventHandler("onMarkerHit", CarSpawn, FreeCars) --still to make all the spawn stuff and system to check spawned vehicles, but this is relatively easy. Client function FreeCarGUI() dxDrawLine(307 - 1, 458 - 1, 307 - 1, 590, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(493, 458 - 1, 307 - 1, 458 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(307 - 1, 590, 493, 590, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(493, 590, 493, 458 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(307, 458, 186, 132, tocolor(12, 49, 206, 152), false) dxDrawText("1. Sanchez", 323 - 1, 473 - 1, 476 - 1, 510 - 1, tocolor(234, 242, 18, 111), 2.50, "default", "left", "top", false, false, false, false, false) dxDrawText("1. Sanchez", 323 + 1, 473 - 1, 476 + 1, 510 - 1, tocolor(234, 242, 18, 111), 2.50, "default", "left", "top", false, false, false, false, false) dxDrawText("1. Sanchez", 323 - 1, 473 + 1, 476 - 1, 510 + 1, tocolor(234, 242, 18, 111), 2.50, "default", "left", "top", false, false, false, false, false) dxDrawText("1. Sanchez", 323 + 1, 473 + 1, 476 + 1, 510 + 1, tocolor(234, 242, 18, 111), 2.50, "default", "left", "top", false, false, false, false, false) dxDrawText("1. Sanchez", 323, 473, 476, 510, tocolor(0, 0, 0, 172), 2.50, "default", "left", "top", false, false, false, false, false) end addEvent("showfreecar", true) addEventHandler("showfreecar", root, FreeCarGUI) Thank you for any help. I used Remp's GUI editor for this, I am very bad with DX elements.
×
×
  • Create New...