Jump to content

GUI


Recommended Posts

Posted
Use guiSetVisible at the start of the resource and it will be depending on the x,y arguments of the window i think.

Ye he say true

function changeVisibility ( ) 
        -- we check if the gui element is visible 
        guiSetVisible (myWindow, not guiGetVisible ( myWindow ) ) 
end 
  
--Create a gui window called 'myWindow' 
myWindow = guiCreateWindow ( 0.3, 0.3, 0.5, 0.60, "GUI window title", true ) 
--Set a timer to change the window's visibility every 2 seconds, infinite times 
setTimer ( changeVisibility, 2000, 0 ) 

https://wiki.multitheftauto.com/wiki/GuiSetVisible

here can find more

Scripting in lua

Posted

Here's a code:

local screenWidth, screenHeight = guiGetScreenSize() 
local windowWidth, windowHeight = 240, 89 
local left = screenWidth/2 - windowWidth/2 
local top = screenHeight/2 - windowHeight/2 
prog =  guiCreateWindow(left, top, windowWidth, windowHeight,MIDDLE, false) 

You should use this program, It helped me with my Login GUI: viewtopic.php?f=91&t=27739&p=427822&hilit=+LUA#p427765

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...