Guest User

Untitled

a guest
Aug 6th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.08 KB | None | 0 0
  1. local Fenster = {}
  2. local Knopf = {}
  3. local Label = {}
  4. local Edit = {}
  5. local Bild = {}
  6.    
  7. local function createGui()
  8.     if(Guivar == 1) then return end -- Check
  9.     Guivar = 1 -- setze Variable auf 1
  10.     showCursor(true) -- Mauszeiger anzeigen
  11.     guiSetInputMode("no_binds_when_editing")
  12.  
  13.     local sWidth, sHeight = guiGetScreenSize()
  14.     local dWidth, dHeight = guiGetScreenSize()
  15.     local wWidth, wHeight = guiGetScreenSize()
  16.          
  17.     local Width,Height = 783,614 -- ""
  18.     local X = (sWidth/2) - (Width/2) -- ""
  19.     local Y = (sHeight/2) - (Height/2) -- ""
  20.    
  21.     local kWidth,kHeight = 757,184 -- ""
  22.     local X1 = (dWidth/2) - (Width/2) -- ""
  23.     local Y1 = (dHeight/2) - (Height/2) -- ""
  24.    
  25.     local lWidth,lHeight = 763,5 -- ""
  26.     local X2 = (wWidth/2) - (Width/2) -- ""
  27.     local Y2 = (wHeight/2) - (Height/2) -- ""
  28.    
  29.     Fenster[1] = guiCreateWindow(X,Y,Width, Height,"Loginpanel",false)
  30.     Bild[1] = guiCreateStaticImage(X1,Y1,kWidth,kHeight,"img/banner.png",false,Fenster[1])
  31.     Bild[2] = guiCreateStaticImage(X2,Y2,lWidth,lHeight,"img/member_aus.png",false,Fenster[1])
  32.     Knopf[1] = guiCreateButton(9,523,762,37,"Register & Login",false,Fenster[1])
  33.     Knopf[2] = guiCreateButton(9,569,762,36,"Credits",false,Fenster[1])
  34.     Edit[1] = guiCreateEdit(232,302,323,31,"",false,Fenster[1])
  35.     Label[1] = guiCreateLabel(241,240,278,60,"Username:",false,Fenster[1])
  36.     guiLabelSetColor(Label[1],255,255,0)
  37.     guiLabelSetHorizontalAlign(Label[1],"center",false)
  38.     guiSetFont(Label[1],"sa-header")
  39.     Edit[2] = guiCreateEdit(232,432,323,31,"",false,Fenster[1])
  40.     Label[2] = guiCreateLabel(241,353,278,60,"Password:",false,Fenster[1])
  41.     guiLabelSetColor(Label[2],255,255,0)
  42.     guiSetFont(Label[2],"sa-header")
  43.  
  44.     addEventHandler("onClientGUIClick", Knopf[1], function() -- dann den Registrieren Knopf
  45.         local text1, text2 = guiGetText(Edit[1]), guiGetText(Edit[2])
  46.         if(text1 == "") or (text2 == "") then return end
  47.         triggerServerEvent("onDatenbankCheck", gMe, text1, text2) -- Event triggern
  48.     end, false)
  49.    
  50.     addEventHandler("onClientGUIClick", Knopf[2], function() -- dann den Registrieren Knopf
  51.         triggerServerEvent("onCredits", gMe)
  52.     end, false)
  53. end
Advertisement
Add Comment
Please, Sign In to add comment