iFoReX Posted April 30, 2012 Posted April 30, 2012 porq no funciona mi removerow :c me dice bad argument aqui el codigo estan en las lineas 141 y 157 GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0,0.0017,0.3575,0.8917,"",true) GUIEditor_Grid[1] = guiCreateGridList(10,28,108,193,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column1 = guiGridListAddColumn(GUIEditor_Grid[1],"Ciudades",0.-- s8) --> row1 = guiGridListAddRow(GUIEditor_Grid[1]) row2 = guiGridListAddRow(GUIEditor_Grid[1]) row3 = guiGridListAddRow(GUIEditor_Grid[1]) row4 = guiGridListAddRow(GUIEditor_Grid[1]) GUIEditor_Grid[2] = guiCreateGridList(11,242,125,193,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[2],2) column2 = guiGridListAddColumn(GUIEditor_Grid[2],"Categorias",0.-- s8) --> row5 = guiGridListAddRow(GUIEditor_Grid[2]) row6 = guiGridListAddRow(GUIEditor_Grid[2]) row7 = guiGridListAddRow(GUIEditor_Grid[2]) row8 = guiGridListAddRow(GUIEditor_Grid[2]) row9 = guiGridListAddRow(GUIEditor_Grid[2]) row10 = guiGridListAddRow(GUIEditor_Grid[2]) row11 = guiGridListAddRow(GUIEditor_Grid[2]) GUIEditor_Grid[3] = guiCreateGridList(146,241,131,195,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[3],2) columnp = guiGridListAddColumn(GUIEditor_Grid[3],"Personajes",0.-- s8) --> GUIEditor_Memo[1] = guiCreateMemo(123,52,157,168,"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Label[1] = guiCreateLabel(160,29,72,15,"Informacion",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(146,482,131,44,"Spawn",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,504,127,17,"GUI Creada por ElMota",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(17,445,35,22,"<",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(77,445,35,22,">",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(54,444,22,22,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[1],true) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) addEvent("onVisibleGUI", true) addEventHandler("onVisibleGUI", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) showCursor(true) triggerServerEvent("onRadarHud", getLocalPlayer()) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then triggerServerEvent("offRadarHud", getLocalPlayer()) end end ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiGridListSetItemText(GUIEditor_Grid[2],row5,column2,"Policia", false, false) guiGridListSetItemText(GUIEditor_Grid[2],row6,column2,"Militar", false, false) guiGridListSetItemText(GUIEditor_Grid[2],row7,column2,"Taxista", false, false) guiGridListSetItemText(GUIEditor_Grid[2],row8,column2,"Medico", false, false) guiGridListSetItemText(GUIEditor_Grid[2],row9,column2,"Ladron", false, false) guiGridListSetItemText(GUIEditor_Grid[2],row11,column2,"Motosiclista", false, false) guiGridListSetItemText(GUIEditor_Grid[1],row1,column1,"LS", false, false) guiGridListSetItemText(GUIEditor_Grid[1],row2,column1,"LV", false, false) guiGridListSetItemText(GUIEditor_Grid[1],row3,column1,"SF", false, false) guiGridListSetItemText(GUIEditor_Grid[1],row4,column1,"Clanes Privados", false, false) end ) addEventHandler( 'onClientGUIClick', guiRoot, function( ) if source == GUIEditor_Grid[1] then nRow = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) if nRow ~= -1 then if nRow == 0 then guiSetText(GUIEditor_Memo[1], "Escoge el Spawn que quieras de LS disfrutaloo") triggerServerEvent( 'onCameraM1', localPlayer ) elseif nRow == 1 then guiSetText(GUIEditor_Memo[1], "Escoge el Spawn que quieras de LV disfrutaloo") triggerServerEvent( 'onCameraM2', localPlayer ) elseif nRow == 2 then guiSetText(GUIEditor_Memo[1], "Escoge el Spawn que quieras de SF disfrutaloo") triggerServerEvent( 'onCameraM3', localPlayer ) elseif nRow == 3 then guiSetText(GUIEditor_Memo[1], "Estos son Clanes Privados No entrar Si no quieres morir") triggerServerEvent( 'onCameraM4', localPlayer ) end end end end ) addEventHandler ( 'onClientGUIClick', guiRoot, function ( ) if ( source == GUIEditor_Button[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) local rowP, colP = guiGridListGetSelectedItem ( GUIEditor_Grid[2] ) if ( row and col and row ~= -1 and col ~= -1 ) then guiSetText ( GUIEditor_Memo[1], "Debes elegir algun Personaje" ) guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) elseif ( rowP and colP and rowP ~= -1 and colP ~= -1 ) then guiSetText ( GUIEditor_Memo[1], "Debes elegir alguna Ciudad" ) elseif ( nRow == 0 and nRow2 == 0 ) then end end end ) addEventHandler( 'onClientGUIClick', guiRoot, function( ) if source == GUIEditor_Grid[2] then nRow2 = guiGridListGetSelectedItem( GUIEditor_Grid[2] ) if nRow ~= -1 and nRow2 ~= -1 then if nRow == 0 and nRow2 == 0 then guiSetText(GUIEditor_Memo[1], "Tu mision es defender a la Gente honesta matando a Delincuentes") triggerServerEvent( 'onCameraM5', localPlayer ) guiGridListRemoveRow( GUIEditor_Grid[3], rowM ) guiGridListRemoveRow( GUIEditor_Grid[3], rowMV ) local rowPS = guiGridListAddRow( GUIEditor_Grid[3] ) local rowPF = guiGridListAddRow( GUIEditor_Grid[3] ) local rowP = guiGridListAddRow( GUIEditor_Grid[3] ) guiGridListSetItemText( GUIEditor_Grid[3], rowPS, columnp, "Poli SWAT", false, false ) guiGridListSetItemText( GUIEditor_Grid[3], rowPF, columnp, "Poli FBI", false, false ) guiGridListSetItemText( GUIEditor_Grid[3], rowP, columnp, "Poli", false, false ) elseif nRow == 0 and nRow2 == 1 then guiSetText(GUIEditor_Memo[1], "Tu mision es ayudar a los polis por si no puede con algo...") guiGridListRemoveRow( GUIEditor_Grid[3], rowPS ) guiGridListRemoveRow( GUIEditor_Grid[3], rowPF ) guiGridListRemoveRow( GUIEditor_Grid[3], rowP ) local rowM = guiGridListAddRow( GUIEditor_Grid[3] ) local rowMV = guiGridListAddRow( GUIEditor_Grid[3] ) guiGridListSetItemText( GUIEditor_Grid[3], rowM, columnp, "Militar", false, false ) guiGridListSetItemText( GUIEditor_Grid[3], rowMV, columnp, "Militar Vendeta", false, false ) triggerServerEvent( 'onCameraM6', localPlayer ) elseif nRow == 0 and nRow2 == 2 then guiSetText(GUIEditor_Memo[1], "Tu mision es ir a recoger y buscar personas que te llamen") triggerServerEvent( 'onCameraM7', localPlayer ) elseif nRow == 0 and nRow2 == 3 then guiSetText(GUIEditor_Memo[1], "Tu mision es ir en la ambulancia y ayudar a los mas necesitados") triggerServerEvent( 'onCameraM8', localPlayer ) elseif nRow == 0 and nRow2 == 4 then guiSetText(GUIEditor_Memo[1], "Tienes que matar y robar a la gente cuidado con los polis") triggerServerEvent( 'onCameraM9', localPlayer ) elseif nRow == 0 and nRow2 == 5 then guiSetText(GUIEditor_Memo[1], "Tienes que matar y robar a la gente cuidado con los polis") triggerServerEvent( 'onCameraM10', localPlayer ) elseif nRow == 1 and nRow2 == 0 then guiSetText(GUIEditor_Memo[1], "Tu mision es defender a la Gente honesta matando a Delincuentes") triggerServerEvent( 'onCameraM12', localPlayer ) elseif nRow == 1 and nRow2 == 1 then guiSetText(GUIEditor_Memo[1], "Tu mision es ayudar a los polis por si no puede con algo...") triggerServerEvent( 'onCameraM13', localPlayer ) elseif nRow == 1 and nRow2 == 2 then guiSetText(GUIEditor_Memo[1], "Tu mision es ir a recoger y buscar personas que te llamen") triggerServerEvent( 'onCameraM14', localPlayer ) elseif nRow == 1 and nRow2 == 3 then guiSetText(GUIEditor_Memo[1], "Tu mision es ir en la ambulancia y ayudar a los mas necesitados") triggerServerEvent( 'onCameraM15', localPlayer ) elseif nRow == 1 and nRow2 == 4 then guiSetText(GUIEditor_Memo[1], "Tienes que matar y robar a la gente cuidado con los polis") triggerServerEvent( 'onCameraM16', localPlayer ) elseif nRow == 1 and nRow2 == 6 then guiSetText(GUIEditor_Memo[1], "No ai mision solo conocer todo GTA") triggerServerEvent( 'onCameraM17', localPlayer ) elseif nRow == 2 and nRow2 == 0 then guiSetText(GUIEditor_Memo[1], "Tu mision es defender a la Gente honesta matando a Delincuentes") triggerServerEvent( 'onCameraM18', localPlayer ) elseif nRow == 2 and nRow2 == 1 then guiSetText(GUIEditor_Memo[1], "Tu mision es ayudar a los polis por si no puede con algo...") triggerServerEvent( 'onCameraM19', localPlayer ) elseif nRow == 2 and nRow2 == 2 then guiSetText(GUIEditor_Memo[1], "Tu mision es ir a recoger y buscar personas que te llamen") triggerServerEvent( 'onCameraM20', localPlayer ) elseif nRow == 2 and nRow2 == 3 then guiSetText(GUIEditor_Memo[1], "Tu mision es ir en la ambulancia y ayudar a los mas necesitados") triggerServerEvent( 'onCameraM21', localPlayer ) elseif nRow == 2 and nRow2 == 4 then guiSetText(GUIEditor_Memo[1], "Tienes que matar y robar a la gente cuidado con los polis") triggerServerEvent( 'onCameraM22', localPlayer ) elseif nRow == 2 and nRow2 == 6 then guiSetText(GUIEditor_Memo[1], "No ai mision solo conocer todo GTA") triggerServerEvent( 'onCameraM23', localPlayer ) end end end end ) addEventHandler("onClientPlayerWasted", getLocalPlayer(), function() setElementHealth( localPlayer, 1607.3630371094, 1816.3391113281, 10.8203125 ) guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end )
Alexs Posted April 30, 2012 Posted April 30, 2012 #Off Topic: es HAY no AI, asi no se burlan de tu ORTOgrafia. y respecto al Row: No se que es un row, pero creo que tienen un error de argumentos
iFoReX Posted April 30, 2012 Author Posted April 30, 2012 no se e corregido los argumentos un sinfin de veses y sigue igual
Alexs Posted April 30, 2012 Posted April 30, 2012 Pues, quiza si intentas asi: guiGridListRemoveRow( GUIEditor_Grid[3] ) y asi con todos
Castillo Posted April 30, 2012 Posted April 30, 2012 @Alexs_Steel: Siempre tenes que mirar los argumentos requeridos en la wiki. Required ArgumentsgridList: The grid list you want to remove a row from rowIndex: The row ID which you want to remove
iFoReX Posted April 30, 2012 Author Posted April 30, 2012 entonces que esta mal :c si esta el Grid list y el row que quiero remover
Edikosh998 Posted April 30, 2012 Posted April 30, 2012 OFF Topic : esa GUI que creaste esta muy bueno, pero en mi opinion, ya lo re quemaron en miles de servers Que es rowM?
Alexs Posted April 30, 2012 Posted April 30, 2012 OFF Topic : esa GUI que creaste esta muy bueno, pero en mi opinion, ya lo re quemaron en miles de servers Que es rowM? local rowM = guiGridListAddRow( GUIEditor_Grid[3] )
iFoReX Posted April 30, 2012 Author Posted April 30, 2012 a que te referis con " ya lo re quemaron en miles de servers " ? y rowM es en lo que dice en la Img como "militar"
Recommended Posts