ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. guiGetSize

Function

guiGetSize

Returns a control's size.

Syntax

float guiGetSize(element theElement, bool relative)

Arguments

theElementelement
The control.
relativebool
true: fraction of the parent, false: pixels.Optional in MTA:SA: bool relative = false

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

guiGetSize(gui-element theElement, bool relative = false)

Returns

Width and height.

Example

local w, h = guiGetSize(win, false)