Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ---- Informacje ----
- @Autor: STOPseba < stopsebaofficial@op.pl >
- @Pomagał: STOPseba
- @Edytował: STOPseba
- @Copyright: Your New Experience MTA
- @Zakazuje się rozpowszechniania bądź używania zasoby bez zgody pierwotnego autora zasobu (STOPseba)
- ---- Kontakt ----
- @GG:55028983
- @Skype:STOPseba
- @stopsebaofficial@op.pl
- ]]--
- if getElementData(localPlayer, "player:uid") then return end
- local root = getRootElement()
- local resourceRoot = getResourceRootElement(getThisResource())
- local screenWidth, screenHeight = guiGetScreenSize()
- --[[
- local blurStrength = 70
- local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
- blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
- function renderblur()
- if blur == true then
- dxUpdateScreenSource(myScreenSource)
- dxSetShaderValue(blurShader, "ScreenSource", myScreenSource);
- dxSetShaderValue(blurShader, "BlurStrength", blurStrength);
- dxSetShaderValue(blurShader, "UVSize", screenWidth, screenHeight);
- dxDrawImage(0, 0, screenWidth, screenHeight, blurShader)
- end
- end
- addEventHandler("onClientRender", root, renderblur)
- addEventHandler("onClientResourceStop", resourceRoot,
- function()
- if (blurShader) then
- destroyElement(blurShader)
- blurShader = nil
- end
- end)
- x,y=2313.58, 1282.80-- my width
- intro_step=math.random(0,850)
- --]]
- local sx,sy=guiGetScreenSize()
- local data={ showed=nil, button={}, info=nil, misc=nil, }
- function isMouseIn(psx,psy,pssx,pssy,abx,aby)
- if not isCursorShowing() then return end
- cx,cy=getCursorPosition()
- cx,cy=cx*sx,cy*sy
- if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
- return true,cx,cy
- else
- return false
- end
- end
- local dist = 100
- local angler = 0
- function getPointFromDistanceRotation(x, y, dist, angler)
- local a = math.rad(90 - angler)
- local dx = math.cos(a) * dist;
- local dy = math.sin(a) * dist;
- return x+dx, y+dy;
- end
- function renderLoginBox()
- blur = true
- dxDrawRectangle(sx*270/1025, sy*4600/14769, sx*500/1025, sy*58/167, tocolor(255, 255, 255, 100), false)
- --exports["YNE-Dodatki"]:dxDrawBluredRectangle(sx*270/1025, sy*4600/14769, sx*500/1025, sy*58/167, tocolor(150, 150, 150, 255), false)
- dxDrawRectangle(sx *270/1025, sy *4600/14769, sx * 0.0052, sy * 58/167, tocolor(49, 237, 254, 199), false)
- if data.info then dxDrawText(data.info, sx*252/1024, sy*272/768, sx*800/1024, sy*255/768, tocolor(255, 0, 0, 255), 1.00, "default", "center", "center", false) end
- dxDrawText("Nazwa Użytkownika", sx*80/1024, sy*270/768, sx*760/1024, sy*302/768, white, 1.30, "default-bold", "center", "center", false)
- dxDrawText("Hasło", sx*80/1024, sy*480/768, sx*760/1024, sy*302/768, white, 1.30, "default-bold", "center", "center", false)
- dxDrawText("Forum: W trakcie prac", sx*-5/1054, sy*690/768, sx*760/1024, sy*302/768, white, 1.2, "default-bold", "center", "center", false)
- if not isMouseIn(sx*620/1024, sy*450/768, sx*200/1024, sy*45/768) then dxDrawRectangle(sx*620/1024, sy*450/768, sx*150/1024, sy*45/768, tocolor(0, 128, 255), false)
- else dxDrawRectangle(sx*620/1024, sy*450/768, sx*150/1024, sy*45/768, tocolor(49, 237, 254, 179), false) end
- if not isMouseIn(sx*620/1024, sy*390/768, sx*200/1024, sy*45/768) then dxDrawRectangle(sx*620/1024, sy*390/768, sx*150/1024, sy*45/768, tocolor(0, 128, 255), false)
- else dxDrawRectangle(sx*620/1024, sy*390/768, sx*150/1024, sy*45/768, tocolor(49, 237, 254, 179), false) end
- dxDrawText("Zaloguj się", sx*1260/1024, sy*780/768, sx*130/1024, sy*45/768, white, 1.5, "default-bold", "center", "center", false)
- dxDrawText("Zarejestruj się", sx*1260/1024, sy*900/768, sx*130/1024, sy*45/768, white, 1.5, "default-bold", "center", "center", false)
- local postepZDJ = math.sin((getTickCount()/360)*4)
- --dxDrawImage(655,100,545,285,"logo.png", postepZDJ ,tocolor(255,255,255,255))
- dxDrawImage(sx * 0.255, sy * 0.-0, sx * 0.500, sy * 0.400, "logo.png",postepZDJ ,tocolor(255,255,255,255))
- local zone1=math.sin(intro_step/500)*9000
- local zone2=math.cos(intro_step/500)*9000
- setCameraMatrix (-1900.30078125, 466.53228759766 -1900.8060302734,465.72592163086, 109.7618560791, zone1, zone2, 2)
- intro_step=intro_step-1
- dxDrawRectangle(sx*270/1024, sy*600/768, sx*500/1024, sy*45/768, tocolor(49, 237, 254, 100), false)
- dxDrawText("Ważne\nX Jeśli teraz się rozłączysz, stracisz Kasę oraz Reputacje. Pamiętaj administracja ci tego nie, zwróci! X", sx*550/1024, sy*1200/768, sx*500/1024, sy*45/768, white, 1, "default-bold", "center", "center", false)
- end
- addEventHandler("onClientClick", root, function(btn,state)
- if btn=="left" and state=="down" then
- if isMouseIn(sx*620/1024, sy*390/768, sx*200/1024, sy*45/768) and data.showed then
- local login=guiGetText(data.button[1])
- local pass=guiGetText(data.button[2])
- if string.len(login) < 2 or string.len(pass) < 2 then
- data.info="Wypełnij wszystkie pola!"
- return
- end
- triggerServerEvent("logging:checkAccount", resourceRoot, login, pass)
- end
- if isMouseIn(sx*620/1024, sy*450/768, sx*200/1024, sy*45/768) and data.showed then
- local login=guiGetText(data.button[1])
- local pass=guiGetText(data.button[2])
- if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < 3 or string.len(pass) < 3 then
- data.info="Login/Hasło muszą mieć mniej niż od 3 do 22 znaków."
- return
- end
- triggerServerEvent("logging:newAccount", resourceRoot, login, pass)
- end
- end
- end)
- addEvent("logging:result", true)
- addEventHandler("logging:result", resourceRoot, function(value,info)
- if not info then info="" end
- if value then
- data.showed=false
- showZones(data.misc)
- -- Usuwamy elementy
- destroyElement(data.button[1])
- destroyElement(data.button[2])
- removeEventHandler("onClientRender", root, renderLoginBox)
- else
- data.info=tostring(info)
- setTimer(function() data.info=nil end, 3000, 1)
- end
- end)
- addEventHandler("onClientResourceStart", resourceRoot, function()
- showChat(false)
- showCursor(true)
- fadeCamera(true)
- data.showed=true
- setElementAlpha(localPlayer,0)
- data.misc=playSound("misc/intro.mp3",true)
- --data.misc=playSound("misc/nuta" .. tostring(math.random(1, 6)) .. ".mp3",true)
- setSoundVolume(data.misc, 1.0)
- showPlayerHudComponent("all",true)
- guiSetInputMode("no_binds_when_editing")
- setElementData(localPlayer,"status","Loguje się")
- addEventHandler("onClientRender", root, renderLoginBox)
- data.button[1]=guiCreateEdit(0.30, 0.40, 0.22, 0.04, "", true)
- data.button[2]=guiCreateEdit(0.30, 0.53, 0.22, 0.04, "", true)
- guiEditSetMasked(data.button[2],true)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement