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

Function

guiGridListGetItemData

ClientInterface (GUI)Identical to MTA:SA

Returns the value attached to a cell with guiGridListSetItemData.

Syntax

mixed guiGridListGetItemData(gui-gridlist gridList, int rowIndex, int columnIndex)

Arguments

gridListgui-gridlist
The list.
rowIndexint
Row (from 0).
columnIndexint
Column (from 1).

Returns

The value or nil.

Example

addEventHandler("onClientGUIClick", buyButton, function()
    local row = guiGridListGetSelectedItem(list)
    if row ~= -1 then
        triggerServerEvent("buyVehicle", localPlayer, guiGridListGetItemData(list, row, 1))
    end
end, false)