Rankox Posted August 1, 2014 Share Posted August 1, 2014 Necesito ayuda con el resource SDT_GUI, tengo este script que pone a todos los Players en una Gridlist y al dar click sobre uno te pone en el chat a quien seleccionaste, pero en vez de hacer eso pone unos numeros raros , como podria solucionar eso? gui = exports["SDT_GUI"] Font = "default-bold" --[[dxCreateFont("Font.ttf",10)]] wnd = gui:dxCreateWindow( 400, 400, 300, 400, "Panel List",tocolor(255,255,255,255),"default-bold","Lighter Black") List = gui:dxCreateList(15,70,270,300, "Itens", wnd,tocolor(0,0,0,255),Font,"Lighter Black") for id, players in ipairs(getElementsByType("player")) do row = gui:dxListAddRow(List,getPlayerName(players),tocolor(0,0,0,255),Font,true) end addEventHandler('onClientDXClick',List, function(button,state) if (button=="left" and state=="up") then selected = gui:dxListGetSelectedItem(List) outputChatBox(selected) end end,false); Link to comment
alex17 Posted August 1, 2014 Share Posted August 1, 2014 tuve el mismbro problema prueva con esto addEventHandler('onClientDXClick',List, function(button,state) if (button=="left" and state=="up") then selected = gui:dxListGetSelectedItem(List) playerselected = gui:dxGetText(selected) outputChatBox(playerselected) end end,false); Link to comment
Rankox Posted August 1, 2014 Author Share Posted August 1, 2014 tuve el mismbro problema prueva con esto addEventHandler('onClientDXClick',List, function(button,state) if (button=="left" and state=="up") then selected = gui:dxListGetSelectedItem(List) playerselected = gui:dxGetText(selected) outputChatBox(playerselected) end end,false); Funciono, muchas gracias Link to comment
Recommended Posts