Jump to content

help with GUI


Kenix

Recommended Posts

So I did for my zombie mod login socket but there is one flaw that I could not fix

when I click on guiedit 1 times nothing happens but if it turns out a few times

What could be wrong?

function is called by another script.

  
function SendClientRegister() 
  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Edit = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
GUIEditor_Button = {} 
  
  
GUIEditor_Window[1] = guiCreateWindow(342,337,578,469,"Login / Register Window",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,32,560,426,false,GUIEditor_Window[1]) 
-- <<<<< поля для заполнения >>>>>> -- 
GUIEditor_Tab[1] = guiCreateTab("Register",GUIEditor_TabPanel[1]) 
GUIEditor_Edit[1] = guiCreateEdit(111,15,172,30,getPlayerName(getLocalPlayer()),false,GUIEditor_Tab[1])  -- ник 
GUIEditor_Edit[2] = guiCreateEdit(111,65,172,30,"",false,GUIEditor_Tab[1])  -- пароль 
GUIEditor_Edit[3] = guiCreateEdit(111,115,172,30,"",false,GUIEditor_Tab[1]) -- емаил  
GUIEditor_Edit[4] = guiCreateEdit(111,165,172,30,"",false,GUIEditor_Tab[1]) -- скайп 
GUIEditor_Edit[5] = guiCreateEdit(111,215,172,30,"",false,GUIEditor_Tab[1]) -- аська 
GUIEditor_Edit[6] = guiCreateEdit(111,265,172,30,"",false,GUIEditor_Tab[1]) -- реальное имя 
GUIEditor_Edit[7] = guiCreateEdit(111,315,172,30,"",false,GUIEditor_Tab[1]) -- реальная фамилия 
 -- <<<<<<<<  надписи >>>>>>> -- 
GUIEditor_Label[1] = guiCreateLabel(11,25,172,60,"Nick:",false,GUIEditor_Tab[1]) 
GUIEditor_Label[2] = guiCreateLabel(11,75,172,60,"Password:",false,GUIEditor_Tab[1]) 
GUIEditor_Label[3] = guiCreateLabel(11,125,172,60,"E-Mail:",false,GUIEditor_Tab[1]) 
GUIEditor_Label[4] = guiCreateLabel(11,175,172,60,"Skype:",false,GUIEditor_Tab[1]) 
GUIEditor_Label[5] = guiCreateLabel(11,225,172,60,"ICQ:",false,GUIEditor_Tab[1]) 
GUIEditor_Label[6] = guiCreateLabel(11,275,172,60,"Real name:",false,GUIEditor_Tab[1]) 
GUIEditor_Label[7] = guiCreateLabel(11,325,172,60,"Real last name:",false,GUIEditor_Tab[1]) 
GUIEditor_Tab[2] = guiCreateTab("Login",GUIEditor_TabPanel[1]) 
GUIEditor_Image[6] = guiCreateStaticImage(350,220,200,200,"login/logo.png",false,GUIEditor_Tab[1]) 
GUIEditor_Button[1] = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Register!", true,GUIEditor_Tab[1]) 
GUIEditor_Button[4] = guiCreateButton( 0.7, 0.40, 0.2, 0.1, "Play as guest!", true,GUIEditor_Tab[1]) 
 -- <<<<<<<<  поля для заполнения в таб 2 >>>>>>> -- 
GUIEditor_Edit[8] = guiCreateEdit(111,15,172,30,getPlayerName(getLocalPlayer()),false,GUIEditor_Tab[2])  -- ник 
GUIEditor_Edit[9] = guiCreateEdit(111,65,172,30,"",false,GUIEditor_Tab[2])  -- пароль 
 -- <<<<<<<<  надписи в таб 2 >>>>>>> -- 
GUIEditor_Label[8] = guiCreateLabel(11,25,172,60,"Nick:",false,GUIEditor_Tab[2]) 
GUIEditor_Label[9] = guiCreateLabel(11,75,172,60,"Password:",false,GUIEditor_Tab[2]) 
  
 -- <<<<<<<<  надписи в таб 1  о названии сервера>>>>>>> -- 
GUIEditor_Label[10] = guiCreateLabel(11,375,172,60,"Russian ",false,GUIEditor_Tab[1]) 
GUIEditor_Label[11] = guiCreateLabel(60,375,172,60,"New",false,GUIEditor_Tab[1]) 
GUIEditor_Label[12] = guiCreateLabel(100,375,172,60,"Zombie",false,GUIEditor_Tab[1]) 
GUIEditor_Label[13] = guiCreateLabel(150,375,172,60,"mod",false,GUIEditor_Tab[1]) 
GUIEditor_Label[14] = guiCreateLabel(190,375,172,60,"Server",false,GUIEditor_Tab[1]) 
GUIEditor_Label[15] = guiCreateLabel(500,375,172,60,"By Volk",false,GUIEditor_Tab[1]) 
guiLabelSetColor(GUIEditor_Label[10],260,100,0) -- черный 
guiLabelSetColor(GUIEditor_Label[11],0,255,0) -- зеленый 
guiLabelSetColor(GUIEditor_Label[12],255,0,0) -- красный 
guiLabelSetColor(GUIEditor_Label[13],100,25,0) --  
guiLabelSetColor(GUIEditor_Label[14],240,100,25) 
guiLabelSetColor(GUIEditor_Label[15],255,0,0) 
  
 -- <<<<<<<<  надписи в таб 2  о названии сервера>>>>>>> -- 
GUIEditor_Label[16] = guiCreateLabel(11,375,172,60,"Russian ",false,GUIEditor_Tab[2]) 
GUIEditor_Label[17] = guiCreateLabel(60,375,172,60,"New",false,GUIEditor_Tab[2]) 
GUIEditor_Label[18] = guiCreateLabel(100,375,172,60,"Zombie",false,GUIEditor_Tab[2]) 
GUIEditor_Label[19] = guiCreateLabel(150,375,172,60,"mod",false,GUIEditor_Tab[2]) 
GUIEditor_Label[20] = guiCreateLabel(190,375,172,60,"Server",false,GUIEditor_Tab[2]) 
GUIEditor_Label[21] = guiCreateLabel(500,375,172,60,"By Volk",false,GUIEditor_Tab[2]) 
guiLabelSetColor(GUIEditor_Label[16],260,100,0) -- черный 
guiLabelSetColor(GUIEditor_Label[17],0,255,0) -- зеленый 
guiLabelSetColor(GUIEditor_Label[18],255,0,0) -- красный 
guiLabelSetColor(GUIEditor_Label[19],100,25,0) --  
guiLabelSetColor(GUIEditor_Label[20],240,100,25) 
guiLabelSetColor(GUIEditor_Label[21],255,0,0) 
GUIEditor_Image[6] = guiCreateStaticImage(350,220,200,200,"login/logo.png",false,GUIEditor_Tab[2]) 
GUIEditor_Button[2] = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Login!", true,GUIEditor_Tab[2]) 
 -- <<<<<<<<  делаем макс символов в поле ввода таб 1 >>>>>>> -- 
--guiEditSetMaxLength ( GUIEditor_Edit[1], 24 ) 
--guiEditSetMaxLength ( GUIEditor_Edit[2], 12 ) 
--guiEditSetMaxLength ( GUIEditor_Edit[3], 24 ) 
--guiEditSetMaxLength ( GUIEditor_Edit[4], 24 ) 
--guiEditSetMaxLength ( GUIEditor_Edit[5], 9 ) 
--guiEditSetMaxLength ( GUIEditor_Edit[6], 12 ) 
--guiEditSetMaxLength ( GUIEditor_Edit[7], 12 ) 
 -- <<<<<<<<  делаем макс символов в поле ввода таб 2 >>>>>>> -- 
--guiEditSetMaxLength ( GUIEditor_Edit[8], 24 ) 
--guiEditSetMaxLength ( GUIEditor_Edit[9], 12 ) 
 -- <<<<<<<<  активируем все кнопки >>>>>>> -- 
guiSetEnabled(GUIEditor_Edit[1], true)  
guiSetEnabled(GUIEditor_Edit[2], true) 
guiSetEnabled(GUIEditor_Edit[3], true)  
guiSetEnabled(GUIEditor_Edit[4], true) 
guiSetEnabled(GUIEditor_Edit[5], true)  
guiSetEnabled(GUIEditor_Edit[6], true) 
guiSetEnabled(GUIEditor_Edit[7], true)  
guiSetEnabled(GUIEditor_Edit[8], true) 
guiSetEnabled(GUIEditor_Edit[9], true)  
  
  
  
guiSetAlpha(GUIEditor_Edit[1],1) 
guiSetAlpha(GUIEditor_Edit[2],1) 
guiSetAlpha(GUIEditor_Edit[3],1) 
guiSetAlpha(GUIEditor_Edit[4],1) 
guiSetAlpha(GUIEditor_Edit[5],1) 
guiSetAlpha(GUIEditor_Edit[6],1) 
guiSetAlpha(GUIEditor_Edit[7],1) 
guiSetAlpha(GUIEditor_Edit[8],1) 
guiSetAlpha(GUIEditor_Edit[9],1) 
  
guiEditSetMasked ( GUIEditor_Edit[2], true ) 
guiEditSetMasked ( GUIEditor_Edit[3], true ) 
guiEditSetMasked ( GUIEditor_Edit[4], true ) 
guiEditSetMasked ( GUIEditor_Edit[5], true ) 
guiEditSetMasked ( GUIEditor_Edit[6], true ) 
guiEditSetMasked ( GUIEditor_Edit[7], true ) 
guiEditSetMasked ( GUIEditor_Edit[9], true ) 
  
  
  
  
             
 -- <<<<<<<<  делаем неподвижное окно >>>>>>> -- 
guiWindowSetMovable(GUIEditor_Window[1], false) 
 -- <<<<<<<<  евент по нажатию кнопок >>>>>>> -- 
addEventHandler("onClientGUIClick", GUIEditor_Button[1], playerregister, false)  -- нажатие кнопка регистрации 
addEventHandler("onClientGUIClick", GUIEditor_Button[4], playerguestaccount, false) -- нажатие кнопки играть без акаунта 
addEventHandler("onClientGUIClick", GUIEditor_Button[2], playerlogin, false) --нажатие кнопки логин 
 -- <<<<<<<<  жвент по нажатию на поле ввода >>>>>>> -- 
 guiSetInputEnabled(true) 
showCursor ( true ) 
if(guiGetVisible(GUIEditor_Window[1]) == false) then -- Если окно невидимо: 
        guiSetVisible(GUIEditor_Window[1], true) -- Делаем его видимым.      
    end 
end 
  

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