aintaro Posted April 2, 2014 Share Posted April 2, 2014 (edited) Hello guys, I've been trying to fix this error for a few days now and still nothing, it drives me crazy can sombody please clarify this: here is my client side code : function createPlayerList () -- Create the grid list shoppingList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) -- Create a players column in the list local column = guiGridListAddColumn( shoppingList, "Player", 0.85 ) if ( column ) then -- If the column has been created, fill it with players for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( shoppingList ) guiGridListSetItemText ( shoppingList, row, column, getPlayerName ( playeritem ), false, false ) local playerName = guiGridListGetItemText ( shoppingList,0, 1) outputChatBox(playerName) end addEventHandler ( "onClientGUIClick", shoppingList, click ) end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end addEventHandler ( "onClientResourceStart", getRootElement(), createPlayerList ) function click () local playerName = guiGridListGetItemText ( shoppingList, guiGridListGetSelectedItem ( shoppingList ), 1 ) ouputChatBox("name : " ..playerName) end here is my output of my debugscript : Edited April 2, 2014 by Guest Link to comment
aintaro Posted April 2, 2014 Author Share Posted April 2, 2014 Omg I feel so stupid right now, *Shoot me in the head please* 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