Xperia Posted January 9, 2013 Posted January 9, 2013 Tengo este script de ACL teams, recien empezado, y mi problema es que no muestra los players que estan conectados: Ventana = guiCreateWindow(342,214,516,358,"ACL Teams",false) guiSetAlpha(Ventana,1) guiWindowSetSizable(Ventana,false) Name = guiCreateLabel(249,37,146,29,"Name:",false,Ventana) guiSetFont(Name,"default-bold-small") Team = guiCreateGridList(9,246,226,100,false,Ventana) guiGridListSetSelectionMode(Team,2) columTeam = guiGridListAddColumn(Team,"Teams",0.99) nameEdit = guiCreateEdit(314,31,191,30,"",false,Ventana) redEdit = guiCreateEdit(314,73,191,30,"",false,Ventana) blueEdit = guiCreateEdit(314,151,191,30,"",false,Ventana) greenEdit = guiCreateEdit(314,112,191,30,"",false,Ventana) Blue = guiCreateLabel(249,159,146,29,"Blue:",false,Ventana) guiSetFont(Blue,"default-bold-small") Green = guiCreateLabel(249,118,146,29,"Green:",false,Ventana) guiSetFont(Green,"default-bold-small") Red = guiCreateLabel(249,80,146,29,"Red:",false,Ventana) guiSetFont(Red,"default-bold-small") local Players = guiCreateGridList(9,27,226,214,false,Ventana) guiGridListSetSelectionMode(Players,2) column = guiGridListAddColumn(Players,"Players",0.99) removeTeam = guiCreateButton(243,295,256,52,"Remove from team",false,Ventana) createTeam = guiCreateButton(243,186,256,52,"Create team",false,Ventana) moveTeam = guiCreateButton(243,240,256,52,"Move to team",false,Ventana) guiSetVisible ( Ventana , false ) bindKey("o","down", function( ) if guiGetVisible ( Ventana ) then guiSetVisible ( Ventana, false ) showCursor ( false ) else guiSetVisible ( Ventana, true ) showCursor ( true ) end end ) function show() if ( column ) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( Players ) guiGridListSetItemText ( Players, row, column, getPlayerName ( playeritem ), false, false ) end end end
Castillo Posted January 9, 2013 Posted January 9, 2013 Sera porque nunca ejecutas la funcion 'show' que es lo que agrega los jugadores? P.D: Cambia el nombre de esta variable: createTeam = guiCreateButton(243,186,256,52,"Create team",false,Ventana)
Recommended Posts