Jump to content

problem con guiSetText


iFoReX

Recommended Posts

:/ no se pone la POS solo unas cuantas letras :/ :/

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(0.2363,0.1683,0.4414,0.6033,"GUI Guardar Posicion",true) 
GUIEditor_Edit[1] = guiCreateEdit(120,322,220,30,"",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(342,322,101,31,"Guardar",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(11,58,431,254,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Posiciones",0.2) 
GUIEditor_Button[2] = guiCreateButton(9,324,106,29,"Obtener Pos",false,GUIEditor_Window[1]) 
  
GUIEditor_Window[2] = guiCreateWindow(0.208,0.29,0.4902,0.3617,"GUI Confirmacion",true) 
guiWindowSetSizable(GUIEditor_Window[2],false) 
GUIEditor_Label[1] = guiCreateLabel(97,47,280,17,"Para Guardar una Posicion debes pagar 20K",false,GUIEditor_Window[2]) 
guiLabelSetColor(GUIEditor_Label[1],255,255,0) 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
GUIEditor_Edit[2] = guiCreateEdit(84,74,301,36,"----Nombre",false,GUIEditor_Window[2]) 
GUIEditor_Label[2] = guiCreateLabel(185,113,176,26,"Estas seguro ?",false,GUIEditor_Window[2]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(12,157,111,43,"Si",false,GUIEditor_Window[2]) 
GUIEditor_Button[4] = guiCreateButton(378,157,111,43,"No",false,GUIEditor_Window[2]) 
  
guiSetVisible(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Window[2],false) 
showCursor(false) 
  
local me = getLocalPlayer() 
  
function obtenerLaPos() 
local x,y,z = getElementPosition( me ) 
if isPedOnGround( localPlayer) and source == GUIEditor_Button[2] then 
guiSetText( GUIEditor_Edit[1], " (..x..,..y..,..z..) " ) 
end 
end 
addEventHandler("onClientGUIClick", root, obtenerLaPos) 
  
function ponerVisible() 
    guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
    showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
end 
end 
bindKey ( "F2","down", ponerVisible ) 

Link to comment
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(0.2363,0.1683,0.4414,0.6033,"GUI Guardar Posicion",true) 
GUIEditor_Edit[1] = guiCreateEdit(120,322,220,30,"",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(342,322,101,31,"Guardar",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(11,58,431,254,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Posiciones",0.2) 
GUIEditor_Button[2] = guiCreateButton(9,324,106,29,"Obtener Pos",false,GUIEditor_Window[1]) 
  
GUIEditor_Window[2] = guiCreateWindow(0.208,0.29,0.4902,0.3617,"GUI Confirmacion",true) 
guiWindowSetSizable(GUIEditor_Window[2],false) 
GUIEditor_Label[1] = guiCreateLabel(97,47,280,17,"Para Guardar una Posicion debes pagar 20K",false,GUIEditor_Window[2]) 
guiLabelSetColor(GUIEditor_Label[1],255,255,0) 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
GUIEditor_Edit[2] = guiCreateEdit(84,74,301,36,"----Nombre",false,GUIEditor_Window[2]) 
GUIEditor_Label[2] = guiCreateLabel(185,113,176,26,"Estas seguro ?",false,GUIEditor_Window[2]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(12,157,111,43,"Si",false,GUIEditor_Window[2]) 
GUIEditor_Button[4] = guiCreateButton(378,157,111,43,"No",false,GUIEditor_Window[2]) 
  
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetVisible ( GUIEditor_Window[2], false ) 
showCursor ( false ) 
  
function obtenerLaPos ( ) 
    local x,y,z = getElementPosition( localPlayer ) 
    if ( isPedOnGround ( localPlayer ) ) and ( source == GUIEditor_Button[2] ) then 
        guiSetText( GUIEditor_Edit[1], "( ".. x ..",".. y ..",".. z .." )" ) 
    end 
end 
addEventHandler ( "onClientGUIClick", root, obtenerLaPos ) 
  
function ponerVisible ( ) 
    guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
    showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
end 
bindKey ( "F2", "down", ponerVisible ) 

Link to comment

Me ayudarian para crear una tabla de SQL a esto porfavor es que no entiendo mucho esto del SQL

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(0.2363,0.1683,0.4414,0.6033,"GUI Guardar Posicion",true) 
GUIEditor_Edit[1] = guiCreateEdit(120,322,220,30,"",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(342,322,101,31,"Guardar",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(11,58,431,254,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Posiciones",0.2) 
GUIEditor_Button[2] = guiCreateButton(9,324,106,29,"Obtener Pos",false,GUIEditor_Window[1]) 
  
GUIEditor_Window[2] = guiCreateWindow(0.208,0.29,0.4902,0.3617,"GUI Confirmacion",true) 
guiWindowSetSizable(GUIEditor_Window[2],false) 
GUIEditor_Label[1] = guiCreateLabel(97,47,280,17,"Para Guardar una Posicion debes pagar 20K",false,GUIEditor_Window[2]) 
guiLabelSetColor(GUIEditor_Label[1],255,255,0) 
guiSetFont(GUIEditor_Label[1],"clear-normal") 
GUIEditor_Edit[2] = guiCreateEdit(84,74,301,36,"----Nombre",false,GUIEditor_Window[2]) 
GUIEditor_Label[2] = guiCreateLabel(185,113,176,26,"Estas seguro ?",false,GUIEditor_Window[2]) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(12,157,111,43,"Si",false,GUIEditor_Window[2]) 
GUIEditor_Button[4] = guiCreateButton(378,157,111,43,"No",false,GUIEditor_Window[2]) 
  
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetVisible ( GUIEditor_Window[2], false ) 
showCursor ( false ) 
  
function obtenerLaPos ( ) 
    local x,y,z = getElementPosition( localPlayer ) 
    if ( isPedOnGround ( localPlayer ) ) and ( source == GUIEditor_Button[2] ) then 
        guiSetText( GUIEditor_Edit[1], "".. x ..", ".. y ..", ".. z .."" ) 
    end 
end 
addEventHandler ( "onClientGUIClick", root, obtenerLaPos ) 
  
function ponerVisible ( ) 
    guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
    showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
end 
bindKey ( "F2", "down", ponerVisible ) 
  
addEventHandler("onClientGUIClick", root, 
function() 
if source == GUIEditor_Button[1] then 
guiSetVisible( GUIEditor_Window[1],false ) 
guiSetVisible( GUIEditor_Window[2],true ) 
showCursor(true) 
elseif source == GUIEditor_Button[4] then 
guiSetVisible( GUIEditor_Window[1],true ) 
guiSetVisible( GUIEditor_Window[2],false ) 
showCursor(true) 
end 
end 
) 

Link to comment

Lo que pasa scripter intermedian, es que SQL es un poco dificil..No es solo crear una tabla, sino tambien es un sistema de consulta (de ahi su nombre claro).

Por lo cual, cada vez que quieras buscar un dato, necesitarias una consulta.

Si queres, y tenes paciencia...te explico lentamente, pero con pasos mas basicos (sino no da).

Link to comment
mmm Ok man voy entendiendo :D, pero lo del executeSQlQuery en lo de VALUES eso no entendi

Inserta en la tabla "tabla" algo.

Y pone, para ponerle valores a la columna uno, dos y tres.

pone pepe mota alguien y seria una nueva entidad

entendes?

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...