Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2020-06-25, 17:05


xyzzzikk

.gg






Wiek: 18
Na forum: 2774 dni
Posty: 175
Nick w MP: aspyk

Piwa: 6499

Respekt: 30,5

Czesc,
mam logowanie z pysa 3.0,

lecz zedytowalem c_logging i gui normalnie dzia?a, lecz: nie loguje i nie wiem dlaczego, poprostu jak by funkcja IsMouseIn nie dzia?a?? od
 addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(sx*1605/1024sy*459/768sx*269/1024sy*55/768) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) < or string.len(pass) < 2 then
                data.info="Nale?y wype?ni? wszystkie pola."
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if isMouseIn(sx*1605/1024sy*524/768,  sx*273/1024sy*55/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) < or string.len(pass) < 3 then
                data.info="Login i has?o powinno zawiera? od 3 do 22 znak?w."
                return
            end
            triggerServerEvent("logging:newAccount"resourceRootloginpass)
        end
    end
end
- Ta cz??? jak by nie dzia?a?a ^^^

if getElementData(localPlayer"player:sid"then return end

local root getRootElement()
local resourceRoot getResourceRootElement(getThisResource())
local screenWidthscreenHeight guiGetScreenSize()


local blurStrength 20


local myScreenSource dxCreateScreenSource(screenWidthscreenHeight)
blurShaderblurTec dxCreateShader("shaders/BlurShader.fx")


function renderblur()
    if blur == true then
        dxUpdateScreenSource(myScreenSource)
        
        dxSetShaderValue(blurShader"ScreenSource"myScreenSource);
        dxSetShaderValue(blurShader"BlurStrength"blurStrength);
        dxSetShaderValue(blurShader"UVSize"screenWidthscreenHeight);

        dxDrawImage(00screenWidthscreenHeightblurShader)
    end
end
addEventHandler("onClientRender"rootrenderblur)

addEventHandler("onClientResourceStop"resourceRoot,
function()
    if (blurShaderthen
        destroyElement(blurShader)
        blurShader nil
    end
end)

x,y=2513.581282.80-- my width
intro_step=math.random(0,850)

local sx,sy=guiGetScreenSize()
local data={ showed=nilbutton={}, info=nilmisc=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(xydistangler)
    local a math.rad(90 angler)
    local dx math.cos(a) * dist;
    local dy math.sin(a) * dist;
    return x+dxy+dy;
end



local codelight dxCreateFont("codelight.ttf"11)


function renderLoginBox()


    dxDrawImage(0019201080"images/logging.png"AristatesYuvarlak00tocolor(255255255255), false)
    --dxDrawRectangle(sx*0/1025sy*0/769sx*320/1025sy*958/767tocolor(000185), false)
    --dxDrawImage(0019201080"misc/drift.png"AristatesYuvarlak00tocolor(255255255255), false)
    if data.info then dxDrawText(data.infosx*-230/1024sy*272/768sx*565/1024sy*290/768tocolor(2552550255), 1.00"default""center""center"falseend
    --dxDrawLine(sx*0/1024sy*199/768sx*1022/1024sy*200/768tocolor(31111193255), 5false)
    --dxDrawLine(sx*0/1024sy*509/768sx*1022/1024sy*510/768tocolor(31111193255), 5false)
    dxDrawText("L O G I N"sx*570/1024sy*365/768sx*565/1024sy*325/768white1.30codelight"center""center"false)
    dxDrawText("H A S L O"sx*570/1024sy*480/768sx*565/1024sy*302/768white1.30codelight"center""center"false)

    if not isMouseIn(sx*850/1024sy*325/768sx*150/1024sy*45/768then   dxDrawImage(sx*850/1024sy*325/768sx*150/1024sy*45/768"b_off.png"000tocolor(255,255,255255), false)
    else dxDrawImage(sx*850/1024sy*325/768sx*150/1024sy*45/768"b_on.png"000tocolor(255,255,255255), falseend

    if not isMouseIn(sx*850/1024sy*370/768sx*150/1024sy*45/768then dxDrawImage(sx*850/1024sy*370/768sx*150/1024sy*45/768"b_off.png"000tocolor(255,255,255255), false)
    else dxDrawImage(sx*850/1024sy*370/768sx*150/1024sy*45/768"b_on.png"000tocolor(255,255,255255), falseend

--    dxDrawText("Zaloguj"1199*w470*h1664*w539*htocolor(255255255255), 1.00codelight15"right""center"falsefalsefalsefalsefalse)
    dxDrawText("Z A L O G U J"sx*1290/1024sy*650/768sx*565/1024sy*45/768tocolor(0,0,0,255), 1.10codelight"center""center"false)
    dxDrawText("Z A R E J E S T R U J"sx*1290/1024sy*740/768sx*565/1024sy*45/768tocolor(0,0,0,255), 1.10codelight"center""center"false)
    --dxDrawImage(sx 0.016sy 0.0413sx 0.2838sy 0.2749"logo.png"000tocolor(255255255255), false)
    --dxDrawImage(sw/2-295,sh/2+70,594,307,"logo.png"angle0, -120 )
    local x,y=getPointFromDistanceRotation(1413.581082.80distangler)
    setCameraMatrix(x,y,207.72+0.9,2623.691285.660+0.9)
    angler=(angler+0.1)
end





addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(sx*1605/1024sy*459/768sx*269/1024sy*55/768) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) < or string.len(pass) < 2 then
                data.info="Nale?y wype?ni? wszystkie pola."
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if isMouseIn(sx*1605/1024sy*524/768,  sx*273/1024sy*55/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) < or string.len(pass) < 3 then
                data.info="Login i has?o powinno zawiera? od 3 do 22 znak?w."
                return
            end
            triggerServerEvent("logging:newAccount"resourceRootloginpass)
        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"rootrenderLoginBox)
    else
        data.info=tostring(info)
        setTimer(function() data.info=nil end30001)
    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)
    showPlayerHudComponent("radar",false)
    setSoundVolume(data.misc1.0)
    showPlayerHudComponent("all",false)
    guiSetInputMode("no_binds_when_editing")
    setElementData(localPlayer,"status","Loguje si?")
    --setElementData(localPlayer,"player:logged",false)
    addEventHandler("onClientRender"rootrenderLoginBox)
    local nick getPlayerNamelocalPlayer )
    data.button[1]=guiCreateEdit(0.6000.430.220.04""..nick..""true)
    data.button[2]=guiCreateEdit(0.6000.490.220.04""true)   
    guiEditSetMasked(data.button[2],true)
end)


[ Dodano: 2020-06-25, 17:06 ]
Dodam, ?e b??d?w w db3 nie ma

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-06-26, 14:51


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Nie zmienia?e? koordynat?w ekranowych?

Postaw piwo autorowi tego posta
 

 
Tagi: logowanie :: nie :: dziala
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Logowanie nie dziala Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku