Advertisement
Guest User

Untitled

a guest
Oct 12th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.43 KB | None | 0 0
  1. GUIEditor_Window = {}
  2. GUIEditor_Button = {}
  3. GUIEditor_Label = {}
  4. GUIEditor_Edit = {}
  5.    
  6.     GUIEditor_Window[1] = guiCreateWindow(328, 272, 355, 207, "Добро пожаловать на сервер", false)
  7.     guiWindowSetSizable(GUIEditor_Window[1], false)
  8.     guiSetAlpha(GUIEditor_Window[1], 0.87)
  9.     GUIEditor_Edit[1] = guiCreateEdit(86, 47, 193, 26, "", false, GUIEditor_Window[1])
  10.     GUIEditor_Edit[2] = guiCreateEdit(86, 101, 193, 26, "", false, GUIEditor_Window[1])
  11.     GUIEditor_Button[1] = guiCreateButton(355, 414, 119, 24, "Вход", false, GUIEditor_Window[1])
  12.     guiSetFont(GUIEditor_Button[1], "default-bold-small")
  13.     GUIEditor_Button[2] = guiCreateButton(539, 414, 119, 24, "Регистрация", false, GUIEditor_Window[1])
  14.     guiSetFont(GUIEditor_Button[2], "default-bold-small")
  15.     GUIEditor_Label[1] = guiCreateLabel(474, 300, 38, 19, "Логин", false, GUIEditor_Window[1])
  16.     guiSetFont(GUIEditor_Label[1], "default-bold-small")
  17.     guiLabelSetColor(GUIEditor_Label[1], 162, 211, 43)
  18.     GUIEditor_Label[2] = guiCreateLabel(474, 354, 75, 18, "Пароль", false, GUIEditor_Window[1])
  19.     guiSetFont(GUIEditor_Label[2], "default-bold-small")
  20.     guiLabelSetColor(GUIEditor_Label[2], 162, 211, 43)
  21.     GUIEditor_Label[3] = guiCreateLabel(343, 443, 325, 19, "Для регистрации аккаунта придумайте логин и пароль", false, GUIEditor_Window[1])
  22.     guiSetAlpha(GUIEditor_Label[3], 0.88)
  23.     guiSetFont(GUIEditor_Label[3], "default-bold-small")
  24.     guiLabelSetColor(GUIEditor_Label[3], 193, 223, 29)
  25.     GUIEditor_Label[4] = guiCreateLabel(367, 410, 315, 19, "Для входа в аккаунт введите логин и пароль", false, GUIEditor_Window[1])
  26.     guiSetAlpha(GUIEditor_Label[4], 0.61)
  27.     guiSetFont(GUIEditor_Label[4], "default-bold-small")
  28.     guiLabelSetColor(GUIEditor_Label[4], 110, 152, 222)  
  29.     showCursor(true)
  30.     guiSetInputEnabled(true)       
  31.  
  32.  
  33. addEventHandler("onClientGUIClick",getRootElement(),
  34.     function ()
  35.         local user = guiGetText(GUIEditor_Edit[1])
  36.         local pass = guiGetText(GUIEditor_Edit[2])
  37.         if ( source == GUIEditor_Button[1] ) then
  38.             triggerServerEvent("onlogin",getLocalPlayer(),user,pass)
  39.         if ( source == GUIEditor_Button[2] ) then
  40.             triggerServerEvent("onre",getLocalPlayer(),user,pass)
  41.         end
  42.     end
  43. )
  44.  
  45. addEvent("setcol",true)
  46. addEventHandler("setcol",getRootElement(),
  47.     function ()
  48.         guiSetVisible(GUIEditor_Window[1],false)
  49.         showCursor(false)
  50.         guiSetInputEnabled(false)
  51.     end
  52. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement