guiGetSize | Multi Theft Auto: Wiki Skip to content

guiGetSize

Client-side
Server-side
Shared

Pair: guiSetSize

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function gets the size of a GUI element.

Syntax

guiGetSize ( )

Code Examples

client

This example creates a random sized gui window and outputs its size to the chatbox.

local window = guiCreateWindow ( 0, 0, (math.random ( 0, 100 ) / 100), (math.random ( 0, 100 ) / 100), "test", true )
-- Create the window
local x, y = guiGetSize ( window, false ) -- Get the gui window size
outputChatBox ( "Window size: " .. x .. " " .. y ) --output the gui window size

See Also

GUI Functions