iFoReX Posted April 28, 2012 Share Posted April 28, 2012 como dice en el tittulo quiero saber como aser para que si un texto ya este escrito luego se escriba otro abajo GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.3375,0.1983,0.5013,0.655,"GUI PM",true) guiWindowSetSizable(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,46,96,28,"",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(9,57,383,281,"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Edit[1] = guiCreateEdit(10,344,288,36,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(302,346,85,37,"Enviar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(36,27,335,32,"PM A : ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Window[2] = guiCreateWindow(0.1663,0.1983,0.1737,0.6533,"GUI Players",true) GUIEditor_Grid[1] = guiCreateGridList(10,28,122,375,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.6) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) function clientsideResourceStart () guiGridListClear(GUIEditor_Grid[1]) if (guiGridListClear) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), clientsideResourceStart ) addEventHandler("onClientGUIDoubleClick", root, function() if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) guiSetText(GUIEditor_Label[2], "PM a : "..playername) local thePlayer = getPlayerFromName ( playername ) end end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then local getText = guiGetText(GUIEditor_Edit[1]) local getName = getPlayerName( localPlayer ) setText = guiSetText(GUIEditor_Memo[1], ""..getName.." : "..getText.."") if (setText) then getTexts = guiGetText(GUIEditor_Memo[1]) guiSetText(GUIEditor_Memo[1], ""..getTexts.."\n\ "..getName.." : "..getText.."") end end end ) Ise esto pero esto me crea 2 textos a la vez Link to comment
Recommended Posts