ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientGUIComboBoxAccepted

Event

onClientGUIComboBoxAccepted

The player picked an item from a GUI combo box.

Handler

addEventHandler("onClientGUIComboBoxAccepted", root, function() ... end)

Differences from MTA:SA

  • These MTA:SA parameters are not here: element theElement

In MTA:SA

function(element theElement)

Source

source is the combo box.

Example

local combo = guiCreateComboBox(20, 20, 200, 120, "Broń", false)
guiComboBoxAddItem(combo, "M4")
addEventHandler("onClientGUIComboBoxAccepted", combo, function()
    outputChatBox("Wybrano " .. guiComboBoxGetItemText(combo, guiComboBoxGetSelected(combo)))
end)

See also