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

Function

guiCreateRadioButton

Creates a radio button for choosing one option of a group. Buttons with the same parent form a group.

Syntax

gui-radiobutton guiCreateRadioButton(float x, float y, float width, float height, string text, bool relative [, element parent = nil])

Arguments

xfloat
X position.
yfloat
Y position.
widthfloat
Width.
heightfloat
Height.
textstring
Text.
relativebool
Relative values.Optional in MTA:SA: bool relative = false
parentelement, optional = nil
Parent.

Differences from MTA:SA

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

In MTA:SA

guiCreateRadioButton(float x, float y, float width, float height, string text, bool relative = false, gui-element parent = nil)

Returns

The radio button.

Example

local win = guiCreateWindow(100, 100, 240, 150, "Pora dnia", false)
local day = guiCreateRadioButton(20, 40, 200, 24, "Dzień", false, win)
local night = guiCreateRadioButton(20, 70, 200, 24, "Noc", false, win)
guiRadioButtonSetSelected(day, true)

See also