Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.11 KB | None | 0 0
  1. --[[
  2. Skrypt By Szydlo (c), orazy przy pomocy wspaniałych użytkowników gtao.pl :) (gtao.pl, szydlogaming@gmail.com)(Zakaz Zmiany Autora)
  3. Dla: edgeLIE
  4. Data Utworzenia: 17.07.2017, 19:32
  5. Panel Logowanaia
  6. ]]
  7. ----------------------------------------------
  8. -- Zasob na kamere pomin to!
  9. local sm = {}
  10. sm.moov = 0
  11. sm.object1,sm.object2 = nil,nil
  12.  
  13. local function removeCamHandler()
  14.     if(sm.moov == 1)then
  15.         sm.moov = 0
  16.     end
  17. end
  18.  
  19. local function camRender()
  20.     if (sm.moov == 1) then
  21.         local x1,y1,z1 = getElementPosition(sm.object1)
  22.         local x2,y2,z2 = getElementPosition(sm.object2)
  23.         setCameraMatrix(x1,y1,z1,x2,y2,z2)
  24.     end
  25. end
  26. addEventHandler("onClientPreRender",root,camRender)
  27.  
  28. function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time)
  29.     if(sm.moov == 1)then return false end
  30.     sm.object1 = createObject(1337,x1,y1,z1)
  31.     sm.object2 = createObject(1337,x1t,y1t,z1t)
  32.     setElementAlpha(sm.object1,0)
  33.     setElementAlpha(sm.object2,0)
  34.     setObjectScale(sm.object1,0.01)
  35.     setObjectScale(sm.object2,0.01)
  36.     moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad")
  37.     moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad")
  38.     sm.moov = 1
  39.     setTimer(removeCamHandler,time,1)
  40.     setTimer(destroyElement,time,1,sm.object1)
  41.     setTimer(destroyElement,time,1,sm.object2)
  42.     return true
  43. end
  44. ---------------------------------------------
  45. -----------------------------------------------
  46. -- Pomocne zmienne
  47. -- Stworz fonta
  48. local FMain = guiCreateFont(":elife-login/files/fonts/lato.ttf", 25)
  49. -- Stworz fonta
  50. local SFMain = guiCreateFont(":elife-login/files/fonts/lato.ttf", 13)
  51. -- "Zdobadz" gui rozmiar ekranu
  52. local screenW, screenH = guiGetScreenSize()
  53. -- "Zdobacz" nazwe gracza
  54. local localPlayerName = getPlayerName(getLocalPlayer())
  55. ------------------------------------------------------
  56. -- GUI:
  57. addEventHandler("onClientResourceStart", resourceRoot,
  58. function()
  59.     -- Ukryj Chat
  60.      showChat(false)
  61.     -- Ukryj Hud
  62.     --Tło
  63.     Bg = guiCreateStaticImage((screenW - 410) / 2, (screenH - 431) / 2, 410, 431, ":elife-login/files/img/bg_login.png", false)
  64.     --Zdjecie pola tekstowego do podania loginu
  65.     Ilogin = guiCreateStaticImage(10, 89, 390, 64, ":elife-login/files/img/butt_login.png", false, Bg)
  66.     -- Pole Tekstowe Dla Ilogin
  67.     Login = guiCreateEdit(24, 11, 337, 47, localPlayerName, false, Ilogin)
  68.         -- lepszy wyglad
  69.         -- Ustaw normalny tekst koloru
  70.         guiSetProperty(Login, "NormalTextColour", "FF727272")
  71.         -- Ustaw kolor zaznaczenia
  72.         guiSetProperty(Login, "ActiveSelectionColour", "FFff7700")
  73.         -- Ustaw czionke
  74.         guiSetFont(Login, SFMain)
  75.     --Zdjecie pola tekstowego do podania hasla
  76.     Ipass = guiCreateStaticImage(10, 191, 390, 67, ":elife-login/files/img/butt_login.png", false, Bg)
  77.    
  78.     -- Pole Tekstowe Dla Ipass
  79.     Pass = guiCreateEdit(24, 11, 337, 50, "Podaj hasło", false, Ipass)
  80.         -- Tutaj to samo co przy login
  81.         guiSetProperty(Pass, "NormalTextColour", "FF727272")
  82.         guiSetProperty(Pass, "ActiveSelectionColour", "FFff7700")
  83.         guiSetFont(Pass, SFMain) -- Ustaw czionke
  84.     Ibutton = guiCreateStaticImage(11, 304, 389, 71, ":elife-login/files/img/butt_login.png", false, Bg)  -- Przycisk
  85.     guiSetProperty(Ibutton, "ImageColours", "tl:FFff7700 tr:FFff7700 bl:FFff7700 br:FFff7700")  --Ustaw kolor przycisku na domyslny
  86.     butt_text = guiCreateLabel(109, 15, 329, 54, "Zaloguj się", false, Ibutton) -- Tekst "Zaloguj sie"
  87.     guiSetFont(butt_text, FMain) -- Ustaw czionke
  88.     logo = guiCreateStaticImage(826, 280, 268, 100, ":elife-login/files/img/logo.png", false)    -- Zdjecie logo
  89.     error = guiCreateLabel(826, 280, 268, 100, "Test", false, Bg)
  90.     guiSetProperty(logo, "AlwaysOnTop", "True") -- Zeby logo zawsze bylo pierwsze
  91.     showCursor(true)-- Pokaz kursor
  92. end)
  93. -----------------------------------------------
  94. -- Przycisk Ibutton:
  95.  
  96.  
  97. -- Gdy kursor najedzie na zdjecie Ibutton zmien kolor.
  98. --------------------------------------------------
  99. -- Wywoluje funkcje
  100. addEventHandler( "onClientMouseEnter", root,
  101. -- Sama funkcja
  102.     function()
  103.     -- Sprawdz source rowna sie Ibutton
  104.         if source == Ibutton or source == butt_text then
  105.             -- Jezeli tak zmien kolor
  106.             guiSetProperty(Ibutton, "ImageColours", "tl:FFff8c28 tr:FFff8c28 bl:FFff8c28 br:FFff8c28")    
  107.             --Koniec funkcji
  108.         end
  109. -- Koniec Wywolanai
  110. end)
  111.  
  112. -- Gdy kursor "wyjdzie" z Ibutton zmien na pierwszy kolor
  113. --------------------------------------------------
  114. -- Wywoluje funkcje
  115. addEventHandler( "onClientMouseLeave", root,
  116. -- Sama funkcja
  117.     function()
  118.         -- Sprawdz source rowna sie Ibutton
  119.         if source == Ibutton or source == butt_text then
  120.             -- Jezeli tak zmien kolor
  121.             guiSetProperty(Ibutton, "ImageColours", "tl:FFff7700 tr:FFff7700 bl:FFff7700 br:FFff7700")
  122.                 --Koniec funkcji
  123.         end
  124. -- Koniec Wywolanai
  125. end)
  126.  
  127. --Gdy uzytkownik kliknie Ibutton wywoalaj funkcje
  128. --------------------------------------------------
  129. addEventHandler ("onClientGUIClick", resourceRoot, function()
  130.     if source == Ibutton or source == butt_text then
  131.         guiSetProperty(Ibutton, "ImageColours", "tl:FFffb049 tr:FFffb049 bl:FFffb049 br:FFffb049")
  132.         local guiLogin = guiGetText(Login)
  133.         local guiPass = guiGetText(Pass)
  134.         triggerServerEvent("ClickLoginIn", localPlayer, guiLogin, guiPass)
  135.     end
  136. end)
  137. ---------------------------------------
  138. -- Editbox(Pole tekstowe) dla Ilogin oraz Ipass:
  139.  
  140. -- Drugi raz Lepszy wyglad editboxow:
  141.  
  142. -- _guiCreateEdit rowna sie guiCreateEdit i to jest zmiena
  143. local _guiCreateEdit = guiCreateEdit
  144. -- funcka guiCreateEdit ((To sa rozmiary oraz trzy kropki to tame pod tym)x, y, w, h, ...)
  145. function guiCreateEdit(x, y, w, h, ...)
  146.  
  147.     local Edit = _guiCreateEdit(x, y, w, h, ...)
  148.  
  149.     -- Zaladuj zdjecie
  150.     guiCreateStaticImage(0, 0, w, 5, "files/img/square_login.png", false, Edit)
  151.     guiCreateStaticImage(0, 0, 3, h, "files/img/square_login.png", false, Edit)
  152.     guiCreateStaticImage(w-3, 0, 3, h, "files/img/square_login.png", false, Edit)
  153.     guiCreateStaticImage(0, h-3, w, 3, "files/img/square_login.png", false, Edit)
  154. -- Przywroc zmiena edit
  155.     return Edit
  156.     -- Koniec
  157. end
  158. -- Jezeli sie kliknie w np "Podaj Login" to zniknie.
  159.  
  160. -- Wywolanaie funkcji
  161. addEventHandler("onClientGUIClick", root, function()
  162.  
  163. -- Jezeli source bedzie rowny Login
  164.     if source == Login then
  165.     -- oraz text login bedzie rowny Podaj Login
  166.         if guiGetText(Login) == "Podaj login" then
  167.         -- Wtedy ustaw tekst na ""
  168.             guiSetText(Login, "")
  169.             -- Koniec Ifa
  170.         end
  171.         -- Jezeli tamten warunek sie nie spelni
  172.     else
  173.     -- jezeli tekst Login bedzie rowny ""
  174.         if guiGetText(Login) == "" or
  175.         -- oraz " "
  176.             guiGetText(Login) == " "
  177.             -- wtedy
  178.             then
  179.                 -- ustaw tekst na "Podaj login"
  180.                 guiSetText(Login, "Podaj login")
  181. -- Koniec ifa
  182.         end
  183.         -- Drugi koniec ifa
  184.     end
  185. -- z tym tak samo
  186.     if source == Pass then
  187.         if guiGetText(Pass) == "Podaj hasło" then
  188.             guiSetText(Pass, "")
  189.             guiEditSetMasked(Pass, true)
  190.         end
  191.     else
  192.         if guiGetText(Pass) == "" or
  193.             guiGetText(Pass) == " "
  194.             then
  195.  
  196.                 guiSetText(Pass, "Podaj hasło")
  197.                 guiEditSetMasked(Pass, false)
  198.  
  199.         end
  200.     end
  201.  
  202. end)
  203. ---------------------------------------------
  204. -- "Zdobadz" login oraz haslo z editboxow
  205. username = guiGetText ( Login )
  206. password = guiGetText ( Pass )
  207. -------------------------------------------
  208. --Kamera:
  209.  
  210. --Kordy
  211. Pos = "2385.98999, -1658.79724, 17.40293,3000.98999, -1658.79724, 17.40293,  2484.05200, -1662.03955, 17.40293,2484.05200, -1662.03955, 17.40293,"
  212. --Fade aby ladnie wygladalo (jakby przejscie)
  213. --fadeCamera ( fadeIn, 1.0,0,0,0)
  214. --Kamera Grove Street                                                               -- Koniec Startow   - Poczatek Koncow                                   -- Koniec Koncow               
  215. smoothMoveCamera ( Pos, 15000)
  216. --Odlicz 15 sekund
  217. setTimer ( Pos, 15000, 1, "232312312" )
  218. --Zrob przejscie (fade)
  219. --Kamera vinewood
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement