guiComboBoxRemoveItem | Multi Theft Auto: Wiki Skip to content

guiComboBoxRemoveItem

Client-side
Server-side
Shared

Manual Review Required

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


This function removes an item from a combobox.

OOP Syntax Help! I don't understand this!

Syntax

bool guiComboBoxRemoveItem ( element comboBox, int itemId )
Required Arguments
  • comboBox: The combobox containing the item you're interested in
  • itemId: The index of the item to remove

Returns

  • bool: value

Returns true if the item was removes successfully, false otherwise.

Code Examples

shared

This example removes selected item.

addCommandHandler("remove",function()
local item = guiComboBoxGetSelected(comboBox)
local text = guiComboBoxGetItemText(comboBox, item)
guiComboBoxRemoveItem(comboBox, item)
outputChatBox("Item with text " .. text .. " has been removed!")
end)

See Also

GUI Functions