Multi Posted May 10, 2014 Posted May 10, 2014 doBusow = guiCreateGridList(425, 313, 400, 209, false) guiGridListAddColumn(doBusow, "Tra", 0.2) guiGridListAddColumn(doBusow, "Wy", 0.2) guiGridListAddColumn(doBusow, "lop", 0.2) guiGridListAddColumn(doBusow, "Do", 0.2) guiGridListAddColumn(doBusow, "Od", 0.2) for i = 1, 2 do guiGridListAddRow(doBusow) end guiGridListSetItemText(doBusow, 0, 1, "1889", false, false) guiGridListSetItemText(doBusow, 0, 2, "1k 1sc", false, false) guiGridListSetItemText(doBusow, 0, 3, "LV", false, false) guiGridListSetItemText(doBusow, 0, 4, "LS", false, false) guiGridListSetItemText(doBusow, 0, 5, "0", false, false) guiSetVisible (doBusow, false) How to do that if I click ROW 1 then i gonna have message on chat "Hello". Sorrz for bad english
Castillo Posted May 10, 2014 Posted May 10, 2014 You must use the onClientGUIClick event and the function guiGridListGetSelectedItem to get the grid list selected item.
Multi Posted May 10, 2014 Author Posted May 10, 2014 Can you show me that on Code? because am not understand
Castillo Posted May 10, 2014 Posted May 10, 2014 https://wiki.multitheftauto.com/wiki/Gu ... lectedItem It has an example which you can use.
Multi Posted May 10, 2014 Author Posted May 10, 2014 ye but how to do it, addEventHandler("onCLientGUIClick", what i need put here??
justn Posted May 10, 2014 Posted May 10, 2014 Try that doBusow = guiCreateGridList(425, 313, 400, 209, false) guiGridListAddColumn(doBusow, "Tra", 0.2) guiGridListAddColumn(doBusow, "Wy", 0.2) guiGridListAddColumn(doBusow, "lop", 0.2) guiGridListAddColumn(doBusow, "Do", 0.2) guiGridListAddColumn(doBusow, "Od", 0.2) for i = 1, 2 do local row = guiGridListAddRow(doBusow) end guiGridListSetItemText(doBusow, row, 1, "1889", false, false) guiGridListSetItemText(doBusow, row, 2, "1k 1sc", false, false) guiGridListSetItemText(doBusow, row, 3, "LV", false, false) guiGridListSetItemText(doBusow, row, 4, "LS", false, false) guiGridListSetItemText(doBusow, row, 5, "0", false, false) guiSetVisible (doBusow, false) addEventHandler("onClientGUIClick",doBusow, function(b) if b == "left" then local selected = guiGridListGetItemText(doBusow, guiGridListGetSelectedItem(doBusow), 1) if selected == "1889" then outputChatBox("Hello") end end end)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now