Zuher Laith Posted October 30, 2017 Share Posted October 30, 2017 Hi As it says in the Title, i have a problem with this ..I looked up on the Wiki and used guiGridListGetItemData, I read the example provided, didn't make it for what I need . function BuyDrink ( button ) if button == "left" then local nRow, nColumn = guiGridListGetSelectedItem( GridList ) if nRow ~= -1 and nColumn ~= - 1 then local row, col = guiGridListGetSelectedItem ( GridList ) local selected = guiGridListGetItemData ( GridList, row, col ) -- This Gives "nil" output outputChatBox ( "You Bought " .. tostring(selected) ) -- Output the Text from selected row of the first Column only end end end Basically I want the Text of my first column selected row, not an int . I hope I made it clear to understand Any help is appreciated . Link to comment
NanoBob Posted October 30, 2017 Share Posted October 30, 2017 (edited) use https://wiki.multitheftauto.com/wiki/GuiGridListGetItemText instead of guiGridListGetItemData Edited October 30, 2017 by NanoBob 1 Link to comment
Zuher Laith Posted October 31, 2017 Author Share Posted October 31, 2017 13 hours ago, NanoBob said: use https://wiki.multitheftauto.com/wiki/GuiGridListGetItemText instead of guiGridListGetItemData Figured it out, I used the "row" int result as a condition since my GridList rows are default . However, what you provided is also a solution . Thank you so much . Link to comment
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