Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Skrypt By Szydlo (c), orazy przy pomocy wspaniałych użytkowników gtao.pl :) (gtao.pl, szydlogaming@gmail.com)(Zakaz Zmiany Autora)
- Dla: edgeLIE
- Data Utworzenia: 17.07.2017, 19:32
- Panel Logowanaia
- ]]
- ----------------------------------------------
- -- Zasob na kamere pomin to!
- local sm = {}
- sm.moov = 0
- sm.object1,sm.object2 = nil,nil
- local function removeCamHandler()
- if(sm.moov == 1)then
- sm.moov = 0
- end
- end
- local function camRender()
- if (sm.moov == 1) then
- local x1,y1,z1 = getElementPosition(sm.object1)
- local x2,y2,z2 = getElementPosition(sm.object2)
- setCameraMatrix(x1,y1,z1,x2,y2,z2)
- end
- end
- addEventHandler("onClientPreRender",root,camRender)
- function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time)
- if(sm.moov == 1)then return false end
- sm.object1 = createObject(1337,x1,y1,z1)
- sm.object2 = createObject(1337,x1t,y1t,z1t)
- setElementAlpha(sm.object1,0)
- setElementAlpha(sm.object2,0)
- setObjectScale(sm.object1,0.01)
- setObjectScale(sm.object2,0.01)
- moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad")
- moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad")
- sm.moov = 1
- setTimer(removeCamHandler,time,1)
- setTimer(destroyElement,time,1,sm.object1)
- setTimer(destroyElement,time,1,sm.object2)
- return true
- end
- ---------------------------------------------
- -----------------------------------------------
- -- Pomocne zmienne
- -- Stworz fonta
- local FMain = guiCreateFont(":elife-login/files/fonts/lato.ttf", 25)
- -- Stworz fonta
- local SFMain = guiCreateFont(":elife-login/files/fonts/lato.ttf", 13)
- -- "Zdobadz" gui rozmiar ekranu
- local screenW, screenH = guiGetScreenSize()
- -- "Zdobacz" nazwe gracza
- local localPlayerName = getPlayerName(getLocalPlayer())
- ------------------------------------------------------
- -- GUI:
- addEventHandler("onClientResourceStart", resourceRoot,
- function()
- -- Ukryj Chat
- showChat(false)
- -- Ukryj Hud
- --Tło
- Bg = guiCreateStaticImage((screenW - 410) / 2, (screenH - 431) / 2, 410, 431, ":elife-login/files/img/bg_login.png", false)
- --Zdjecie pola tekstowego do podania loginu
- Ilogin = guiCreateStaticImage(10, 89, 390, 64, ":elife-login/files/img/butt_login.png", false, Bg)
- -- Pole Tekstowe Dla Ilogin
- Login = guiCreateEdit(24, 11, 337, 47, localPlayerName, false, Ilogin)
- -- lepszy wyglad
- -- Ustaw normalny tekst koloru
- guiSetProperty(Login, "NormalTextColour", "FF727272")
- -- Ustaw kolor zaznaczenia
- guiSetProperty(Login, "ActiveSelectionColour", "FFff7700")
- -- Ustaw czionke
- guiSetFont(Login, SFMain)
- --Zdjecie pola tekstowego do podania hasla
- Ipass = guiCreateStaticImage(10, 191, 390, 67, ":elife-login/files/img/butt_login.png", false, Bg)
- -- Pole Tekstowe Dla Ipass
- Pass = guiCreateEdit(24, 11, 337, 50, "Podaj hasło", false, Ipass)
- -- Tutaj to samo co przy login
- guiSetProperty(Pass, "NormalTextColour", "FF727272")
- guiSetProperty(Pass, "ActiveSelectionColour", "FFff7700")
- guiSetFont(Pass, SFMain) -- Ustaw czionke
- Ibutton = guiCreateStaticImage(11, 304, 389, 71, ":elife-login/files/img/butt_login.png", false, Bg) -- Przycisk
- guiSetProperty(Ibutton, "ImageColours", "tl:FFff7700 tr:FFff7700 bl:FFff7700 br:FFff7700") --Ustaw kolor przycisku na domyslny
- butt_text = guiCreateLabel(109, 15, 329, 54, "Zaloguj się", false, Ibutton) -- Tekst "Zaloguj sie"
- guiSetFont(butt_text, FMain) -- Ustaw czionke
- logo = guiCreateStaticImage(826, 280, 268, 100, ":elife-login/files/img/logo.png", false) -- Zdjecie logo
- error = guiCreateLabel(826, 280, 268, 100, "Test", false, Bg)
- guiSetProperty(logo, "AlwaysOnTop", "True") -- Zeby logo zawsze bylo pierwsze
- showCursor(true)-- Pokaz kursor
- end)
- -----------------------------------------------
- -- Przycisk Ibutton:
- -- Gdy kursor najedzie na zdjecie Ibutton zmien kolor.
- --------------------------------------------------
- -- Wywoluje funkcje
- addEventHandler( "onClientMouseEnter", root,
- -- Sama funkcja
- function()
- -- Sprawdz source rowna sie Ibutton
- if source == Ibutton or source == butt_text then
- -- Jezeli tak zmien kolor
- guiSetProperty(Ibutton, "ImageColours", "tl:FFff8c28 tr:FFff8c28 bl:FFff8c28 br:FFff8c28")
- --Koniec funkcji
- end
- -- Koniec Wywolanai
- end)
- -- Gdy kursor "wyjdzie" z Ibutton zmien na pierwszy kolor
- --------------------------------------------------
- -- Wywoluje funkcje
- addEventHandler( "onClientMouseLeave", root,
- -- Sama funkcja
- function()
- -- Sprawdz source rowna sie Ibutton
- if source == Ibutton or source == butt_text then
- -- Jezeli tak zmien kolor
- guiSetProperty(Ibutton, "ImageColours", "tl:FFff7700 tr:FFff7700 bl:FFff7700 br:FFff7700")
- --Koniec funkcji
- end
- -- Koniec Wywolanai
- end)
- --Gdy uzytkownik kliknie Ibutton wywoalaj funkcje
- --------------------------------------------------
- addEventHandler ("onClientGUIClick", resourceRoot, function()
- if source == Ibutton or source == butt_text then
- guiSetProperty(Ibutton, "ImageColours", "tl:FFffb049 tr:FFffb049 bl:FFffb049 br:FFffb049")
- local guiLogin = guiGetText(Login)
- local guiPass = guiGetText(Pass)
- triggerServerEvent("ClickLoginIn", localPlayer, guiLogin, guiPass)
- end
- end)
- ---------------------------------------
- -- Editbox(Pole tekstowe) dla Ilogin oraz Ipass:
- -- Drugi raz Lepszy wyglad editboxow:
- -- _guiCreateEdit rowna sie guiCreateEdit i to jest zmiena
- local _guiCreateEdit = guiCreateEdit
- -- funcka guiCreateEdit ((To sa rozmiary oraz trzy kropki to tame pod tym)x, y, w, h, ...)
- function guiCreateEdit(x, y, w, h, ...)
- local Edit = _guiCreateEdit(x, y, w, h, ...)
- -- Zaladuj zdjecie
- guiCreateStaticImage(0, 0, w, 5, "files/img/square_login.png", false, Edit)
- guiCreateStaticImage(0, 0, 3, h, "files/img/square_login.png", false, Edit)
- guiCreateStaticImage(w-3, 0, 3, h, "files/img/square_login.png", false, Edit)
- guiCreateStaticImage(0, h-3, w, 3, "files/img/square_login.png", false, Edit)
- -- Przywroc zmiena edit
- return Edit
- -- Koniec
- end
- -- Jezeli sie kliknie w np "Podaj Login" to zniknie.
- -- Wywolanaie funkcji
- addEventHandler("onClientGUIClick", root, function()
- -- Jezeli source bedzie rowny Login
- if source == Login then
- -- oraz text login bedzie rowny Podaj Login
- if guiGetText(Login) == "Podaj login" then
- -- Wtedy ustaw tekst na ""
- guiSetText(Login, "")
- -- Koniec Ifa
- end
- -- Jezeli tamten warunek sie nie spelni
- else
- -- jezeli tekst Login bedzie rowny ""
- if guiGetText(Login) == "" or
- -- oraz " "
- guiGetText(Login) == " "
- -- wtedy
- then
- -- ustaw tekst na "Podaj login"
- guiSetText(Login, "Podaj login")
- -- Koniec ifa
- end
- -- Drugi koniec ifa
- end
- -- z tym tak samo
- if source == Pass then
- if guiGetText(Pass) == "Podaj hasło" then
- guiSetText(Pass, "")
- guiEditSetMasked(Pass, true)
- end
- else
- if guiGetText(Pass) == "" or
- guiGetText(Pass) == " "
- then
- guiSetText(Pass, "Podaj hasło")
- guiEditSetMasked(Pass, false)
- end
- end
- end)
- ---------------------------------------------
- -- "Zdobadz" login oraz haslo z editboxow
- username = guiGetText ( Login )
- password = guiGetText ( Pass )
- -------------------------------------------
- --Kamera:
- --Kordy
- 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,"
- --Fade aby ladnie wygladalo (jakby przejscie)
- --fadeCamera ( fadeIn, 1.0,0,0,0)
- --Kamera Grove Street -- Koniec Startow - Poczatek Koncow -- Koniec Koncow
- smoothMoveCamera ( Pos, 15000)
- --Odlicz 15 sekund
- setTimer ( Pos, 15000, 1, "232312312" )
- --Zrob przejscie (fade)
- --Kamera vinewood
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement