Jump to content

GUI Problem PM


iFoReX

Recommended Posts

I want do a GUI for the players send PMs but I dont know how do the events please help me this is my code

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,222,474,334,"GUI Panel Private Messages",false) 
GUIEditor_Grid[1] = guiCreateGridList(290,108,165,204,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.2) 
GUIEditor_Memo[1] = guiCreateMemo(9,165,268,144,"",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(268,37,105,57,"Enviar",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(385,39,76,57,"Cancelar",false,GUIEditor_Window[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(13,96,121,57,"images/BAT.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(140,95,121,58,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(11,33,236,45,"GUI Panel de mensajes Privados by ElMota",false,GUIEditor_Window[1]) 
  
 local players = getElementsByType( "player" ); 
        for i, plr in pairs( Jugadores ) do -- loop through the table of players 
            local row = guiGridListAddRow( GUIEditor_Grid[1] ); -- add row for player 
            guiGridListSetItemText( GUIEditor_Grid[1], row, col, getPlayerName( plr ), false, false ) 
  
showCursor(true) 
  
function oppenz() 
        if guiGetVisible ( GUIEditor_Window[1] ) then  
                guiSetVisible ( GUIEditor_Window[1], false ) 
showCursor(false) 
  guiSetInputEnabled(false) 
        else 
                guiSetVisible ( GUIEditor_Window[1], true ) 
showCursor(true) 
  guiSetInputEnabled(true) 
   setTimer(glowbabyglow,6000,1) 
 end 
end 
bindKey("F7","down",oppenz) 

what is bad ? the window dont appear :/

Link to comment
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,222,474,334,"GUI Panel Private Messages",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
GUIEditor_Grid[1] = guiCreateGridList(290,108,165,204,false,GUIEditor_Window[1]) 
guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.2) 
GUIEditor_Memo[1] = guiCreateMemo(9,165,268,144,"",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(268,37,105,57,"Enviar",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(385,39,76,57,"Cancelar",false,GUIEditor_Window[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(13,96,121,57,"images/BAT.png",false,GUIEditor_Window[1]) 
GUIEditor_Image[2] = guiCreateStaticImage(140,95,121,58,"images/shruk.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(11,33,236,45,"GUI Panel de mensajes Privados by ElMota",false,GUIEditor_Window[1]) 
for i, plr in pairs( getElementsByType( "player" ) ) do -- loop through the table of players 
    local row = guiGridListAddRow( GUIEditor_Grid[1] ) -- add row for player 
    guiGridListSetItemText( GUIEditor_Grid[1], row, 1, getPlayerName( plr ), false, false ) 
end 
  
function oppenz() 
    guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
    showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
    guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) 
end 
bindKey("F7","down",oppenz) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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