iFoReX Posted March 18, 2012 Posted March 18, 2012 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
Castillo Posted March 18, 2012 Posted March 18, 2012 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)
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 thnx man now u can tell me the events for send PMs ?
Castillo Posted March 18, 2012 Posted March 18, 2012 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.
iFoReX Posted March 18, 2012 Author Posted March 18, 2012 u can help me how uniting the effects? please
Castillo Posted March 19, 2012 Posted March 19, 2012 There are many public Private Message resources, just download one and see how it works.
iFoReX Posted March 19, 2012 Author Posted March 19, 2012 Ok man I dont undestand the scripts of PM :c
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now