Jump to content

GUI Problem PM


iFoReX

Recommended Posts

Posted

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 :/

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted
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) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Events? do you mean functions?

triggerServerEvent -- To trigger a server side event. 
getPlayerFromName -- To get a player element from a name. 
outputChatBox -- To send a chat message. 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

There are many public Private Message resources, just download one and see how it works.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...