Jump to content

Search the Community

Showing results for tags 'guicreatewindow'.

  • 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'm having a slight problem with "guiCreateWindow", it just doesn't appear at all. Here's my client.lua: x, y = guiGetScreenSize () function createGUI () local guiWidth, guiHeight = 500, 300 local centerX, centerY = (x / 2) - (guiWidth / 2), (y / 2) - (guiHeight / 2) myWindow = guiCreateWindow(centerX, centerY, 500, 300, "Information", true) guiSetVisible(myWindow, true) end addEventHandler( "onClientResourceStart", getRootElement( ), createGUI) and here's my meta.xml <meta> <script src="server.lua" type="server" /> <script src="client.lua" type="client" /> </meta> I can't see a single reason for it not to work, checked in debug and no errors there. I think I'm not fully understanding how the different types of positioning work. Earlier on I used the "centerX, centerY" variables on a "dxDrawImage" element, to position it in the exact center of the screen, and it worked fine. The Wiki explains about the position arguments of the "dxDrawImage" function: posX: the absolute X coordinate of the top left corner of the image posY: the absolute Y coordinate of the top left corner of the image However the explanation for the arguments of positioning on the "guiCreateWindow" function are slightly different: x: A float of the 2D x position of the GUI window on a player's screen. This is affected by the relative argument. y: A float of the 2D y position of the GUI window on a player's screen. This is affected by the relative argument. Maybe that's where I'm going wrong. Thanks for reading, hope I've provided enough info.
×
×
  • Create New...