Hello I'm working on something but every time I click the selected grid list it doesn't refresh the content.
Btw I'm using a table.
storeList = {
{food = 22, water = 15000, bp = 12},
{food = 23, water = 20000, bp = 12},
{food = 24, water = 35000, bp = 12},
}
function refreshInfoListt()
for k, v in ipairs(storeList) do
if guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 1) then
guiSetText(GUIEditor.label[2], "Info List: \n\Food: "..v["food"].."\nWater: "..v["water"].."\nBattle Points: "..v["bP"])
end
end
end
addEventHandler("onClientGUIClick", GUIEditor.gridlist[1], refreshInfoListt, false)