kuwalda Posted July 10, 2014 Share Posted July 10, 2014 To understand what I mean, lets have a look at this picture: I have 2 rows - Marka and Cena, which stands for Model and Price. If player selects any model from the list, I can get it using this function: addEventHandler( "onClientGUIClick", root, function( ) if ( source == carShop.gridlist[1] ) then local row, col = guiGridListGetSelectedItem(carShop.gridlist[1]) if ( row == -1 ) then return end local text = guiGridListGetItemText(carShop.gridlist[1], row, col) outputChatBox("BOOM:"..text.."", localPlayer, 255, 255, 255) end end ) The problem is - I know how to return model from it, but how can I return its Price? For example, I have money calculator, which calculates how much money you will have after purchase. I know the Model which player wants to buy, but how can I get its price, which is located in same section? Link to comment
#DRAGON!FIRE Posted July 10, 2014 Share Posted July 10, 2014 if ( guiGridListGetSelectedItem ( gridlist ) ~= -1 ) then local Model = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) --- Select Model local Price = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 2 ) --- Select Price end 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