Jump to content

طلب حل لمشكلة لوحة تسجيل له ماتبون تساعدوني


Recommended Posts

سلام عليكم ورحمة الله وبركاتة

انا حبيت اغير لوحة الي شكل الاتي

20093.png

انا صممته وخلصت جيت اركبها بقيم مود

مشكللة انها لما اجي اكتب اسم مستخدم وكركلمة ماقدر اكتب ليش

    
             
            function centerWindow(center_window)
                local screenW,screenH=guiGetScreenSize()
                local windowW,windowH=guiGetSize(center_window,false)
                local x,y = (screenW-windowW)/2,(screenH-windowH)/2
                guiSetPosition(center_window,x,y,false)
            end    
             
            local sm = {}
            sm.moov = 0
            sm.object1, sm.object2 = nil, nil
             
            local function removeCamHandler ()
                if(sm.moov == 1) then
                    sm.moov = 0
                    removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
                end
            end
 
function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim)
    local now = getTickCount()
    local endTime = tag + animTime
    local elapsedTime = now - tag
    local duration = endTime - tag
    local progress = elapsedTime / duration
    local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim)
   
    return a, b, c
end        
           
            function camRender ()
                if sm.object1 and isElement(sm.object1) then
                    local x1, y1, z1 = getElementPosition ( sm.object1 )
                    local x2, y2, z2 = getElementPosition ( sm.object2 )
                    setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
                end
            end
             
            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" )
               
                addEventHandler ( "onClientPreRender", getRootElement(), camRender )
                sm.moov = 1
                setTimer ( removeCamHandler, time, 1 )
                setTimer ( destroyElement, time, 1, sm.object1 )
                setTimer ( destroyElement, time, 1, sm.object2 )
                return true
            end
 
 
 
 
x, y = guiGetScreenSize()
font="default-bold"
fontTam=5
 
spcGam=dxGetTextWidth ("server-SH-3",fontTam,font)  -- اسم سيرفرك بالنجليزي
 
 
 
function intro()
    guiSetVisible(wnd, false)
    ahora = getTickCount()
    count=ahora-start
    dxDrawImage(0, 0, x, y, '',0,0,0,tocolor(255,255,255),false)
    sizeX=64*1.21
    sizeY=64*1.21
    varX,varY,varZ = anim(start,1000,spcGam,0,0,0,spcGam,150,"OutBack")
    dxDrawText("server-SH-3",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(38,205,0,255),fontTam,font,nil,nil,true)   ---- اسم سيرفرك
    dxDrawText("",1+x/-varY/6-dxGetTextWidth ("i",fontTam,font),y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true)
    dxDrawText("♥",x/2+varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true)
    if (count>1500) then
    varX2,varY2,varZ2 = anim(start+1500,1000,0,0,0,200,250,360,"OutBack")
    dxDrawText("اهلا وسهلا بكم في سيرفر عشاق الوناسة",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true)   ---- اسم سيرفرك
    dxDrawText("نتمنا  ان ينال السيرفر اعجابكم",0+x/2-varY/2,y/2-80+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true)   ---- اسم سيرفرك  
   dxDrawText("Welcome to sever__SH-3 ...",0+x/2-varY/2,y/2-60+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true)
   end
    if (count>2000) then
        varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*5,"Linear")
    dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3)
    dxDrawText("Loading..",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true)
    dxDrawText("Loading..",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true)
    end
end
 
function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim)
    local now = getTickCount()
    local endTime = tag + animTime
    local elapsedTime = now - tag
    local duration = endTime - tag
    local progress = elapsedTime / duration
    local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim)
   
    return a, b, c
end
 
fileDelete("intro_c.lua")
 
 
 
 
 
local sx, sy = guiGetScreenSize()
 
alpha = 250
MP = "files/1.png"
MX = sx
MY = sy
 
function adjIntro(adj)
    _, times = getTimerDetails(IntroTimer)
    if adj == "M1" then
        MX = (MX*0.95)+5
        MY = (MY*0.95)
        if times == 1 then
            setTimer(function()
                if (alpha <= 250) and not (alpha <= 0) then
                    alpha = alpha - 10
                else
                    IntroTimer = setTimer(adjIntro, 50, 26, "M2")
                end
            end, 50, 26)
        end
    elseif adj == "M2" then
        if (alpha < 250) and (alpha >= 0) then
            alpha = alpha + 10
        end
        MX = (MX/0.95)-5
        MY = (MY/0.95)
        MP = "files/2.png"
        if times == 1 then
            setTimer(function()
                MP = "files/3.png"
                setTimer(function()
                    IntroTimer = setTimer(adjIntro, 50, 26, "M3")
                end, 3500, 1)
            end, 4000, 1)
        end
    elseif adj == "M3" then
            MX = (MX*0.95)+5
            MY = (MY*0.95)
        if times == 1 then
            MP = "files/4.png"
            MX = (MX/0.95)-5
            MY = (MY/0.95)
            setTimer(function()
                setTimer(function()
                    if (alpha <= 250) and not (alpha <= 0) then
                        alpha = alpha - 10
                    else
                        removeEventHandler("onClientRender", root, drawIntro)
                        fadeCamera(true, 6, 0, 0, 0)
                        setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5)
                        dx = true
                        showCursor(true)
                        guiSetVisible(wnd, true)
                    end
                end, 50, 26)
            end, 3500, 1)
        end
    end
end
 
function drawIntro()
    dxDrawImage(sx/2-(MX/2), sy/2-(MY/2), MX, MY, MP, 0, 0, 0, tocolor(255, 255, 255, alpha))
end
 
function main()
    removeEventHandler ("onClientRender",root,Dx)
    fadeCamera(false);
    showChat(false)
    IntroSong = playSound ("files/Intro.mp3")
    showPlayerHudComponent("all", false)
    start = getTickCount()
    addEventHandler("onClientRender",getRootElement(),intro)
    setTimer ( function()
    removeEventHandler("onClientRender",getRootElement(),intro)
    IntroTimer = setTimer(adjIntro, 50, 26, "M1")
    addEventHandler("onClientRender", root, drawIntro)
    triggerEvent("onFinishIntro",getRootElement())
    setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5)
   
    guiSetInputEnabled(true)
 
    setElementDimension(localPlayer,0)
 
    setElementData(localPlayer,"new",false)
 
 
   
    end, 5000, 1 )
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main)
 
 
local screenW, screenH = guiGetScreenSize()
 
        wnd = guiCreateStaticImage((screenW - 800) / 2, (screenH - 534) / 2, 800, 534, "background.png", false)
 
        wndwo = guiCreateStaticImage(800 - 290 - 10, (534 - 393) / 2, 290, 393, "img.png", false, wnd)
 
        remember = guiCreateCheckBox(71, 283, 124, 20, "Remember Me !!", true, false, wndwo)
        login = guiCreateStaticImage(38, 325, 233, 45, "login.png", false, wndwo)
        logini = guiCreateStaticImage(28, 158, 37, 41, "login-ico.png", false, wndwo)
        locki = guiCreateStaticImage(28, 231, 37, 37, "lock-ico.png", false, wndwo)
        user = guiCreateEdit(75, 168, 193, 27, "user", false, wndwo)
        pas = guiCreateEdit(75, 235, 193, 27, "pas", false, wndwo)
        logo2 = guiCreateStaticImage(56, 4, 177, 128, "mtalogo.png", false, wndwo)
        label = guiCreateLabel(85, 138, 138, 20, "user ", false, wndwo)
        guiLabelSetHorizontalAlign(label, "center", false)
        guiLabelSetVerticalAlign(label, "center")
        label2 = guiCreateLabel(90, 205, 138, 20, "pas", false, wndwo)
        guiLabelSetHorizontalAlign(label2, "center", false)
        guiLabelSetVerticalAlign(label2, "center")
       
        logo = guiCreateStaticImage(10, (534 - 393) / 2, 290, 393, "img2.png", false, wnd)
 
        logo3 = guiCreateStaticImage(51, 14, 195, 115, "mtalogo.png", false, logo)
        user1 = guiCreateEdit(51, 169, 195, 31, "user3", false, logo)
        pas1 = guiCreateEdit(51, 228, 195, 31, "pas1", false, logo)
        pas1 = guiCreateEdit(51, 283, 195, 31, "pas2", false, logo)
        lock = guiCreateStaticImage(12, 279, 28, 35, "lock-ico.png", false, logo)
        reg = guiCreateStaticImage(32, 341, 224, 42, "register2.png", false, logo)
        loginic = guiCreateStaticImage(12, 159, 29, 44, "login-ico.png", false, logo)
        lock5 = guiCreateStaticImage(12, 224, 28, 35, "lock-ico.png", false, logo)
        label6 = guiCreateLabel(59, 200, 177, 22, "pas", false, logo)
        guiLabelSetHorizontalAlign(label6, "center", false)
        guiLabelSetVerticalAlign(label6, "center")
        label7 = guiCreateLabel(59, 139, 177, 22, "user", false, logo)
        guiLabelSetHorizontalAlign(label7, "center", false)
        guiLabelSetVerticalAlign(label7, "center")
        label8 = guiCreateLabel(59, 259, 177, 22, "pas", false, logo)
        guiLabelSetHorizontalAlign(label8, "center", false)
        guiLabelSetVerticalAlign(label8, "center")    
 
 
            guiSetEnabled (wnd, false)
            centerWindow(wnd)
            triggerServerEvent("onGetSave",localPlayer)
     
            addEvent("onPutSave",true)
           
Edited by Guest
Link to comment

شباب وينكم يومين ماحد يرد كاني اقول لغز

الووو وين مبرمجين

وينكم

انا مش عارف اكنتب حاجة

    
             
            function centerWindow(center_window)
                local screenW,screenH=guiGetScreenSize()
                local windowW,windowH=guiGetSize(center_window,false)
                local x,y = (screenW-windowW)/2,(screenH-windowH)/2
                guiSetPosition(center_window,x,y,false)
            end    
             
            local sm = {}
            sm.moov = 0
            sm.object1, sm.object2 = nil, nil
             
            local function removeCamHandler ()
                if(sm.moov == 1) then
                    sm.moov = 0
                    removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
                end
            end
 
function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim)
    local now = getTickCount()
    local endTime = tag + animTime
    local elapsedTime = now - tag
    local duration = endTime - tag
    local progress = elapsedTime / duration
    local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim)
   
    return a, b, c
end        
           
            function camRender ()
                if sm.object1 and isElement(sm.object1) then
                    local x1, y1, z1 = getElementPosition ( sm.object1 )
                    local x2, y2, z2 = getElementPosition ( sm.object2 )
                    setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
                end
            end
             
            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" )
               
                addEventHandler ( "onClientPreRender", getRootElement(), camRender )
                sm.moov = 1
                setTimer ( removeCamHandler, time, 1 )
                setTimer ( destroyElement, time, 1, sm.object1 )
                setTimer ( destroyElement, time, 1, sm.object2 )
                return true
            end
 
 
 
 
x, y = guiGetScreenSize()
font="default-bold"
fontTam=5
 
spcGam=dxGetTextWidth ("server-SH-3",fontTam,font)  -- اسم سيرفرك بالنجليزي
 
 
 
function intro()
    guiSetVisible(wnd, false)
    ahora = getTickCount()
    count=ahora-start
    dxDrawImage(0, 0, x, y, '',0,0,0,tocolor(255,255,255),false)
    sizeX=64*1.21
    sizeY=64*1.21
    varX,varY,varZ = anim(start,1000,spcGam,0,0,0,spcGam,150,"OutBack")
    dxDrawText("server-SH-3",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(38,205,0,255),fontTam,font,nil,nil,true)   ---- اسم سيرفرك
    dxDrawText("",1+x/-varY/6-dxGetTextWidth ("i",fontTam,font),y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true)
    dxDrawText("♥",x/2+varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true)
    if (count>1500) then
    varX2,varY2,varZ2 = anim(start+1500,1000,0,0,0,200,250,360,"OutBack")
    dxDrawText("اهلا وسهلا بكم في سيرفر عشاق الوناسة",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true)   ---- اسم سيرفرك
    dxDrawText("نتمنا  ان ينال السيرفر اعجابكم",0+x/2-varY/2,y/2-80+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true)   ---- اسم سيرفرك  
   dxDrawText("Welcome to sever__SH-3 ...",0+x/2-varY/2,y/2-60+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true)
   end
    if (count>2000) then
        varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*5,"Linear")
    dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3)
    dxDrawText("Loading..",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true)
    dxDrawText("Loading..",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true)
    end
end
 
function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim)
    local now = getTickCount()
    local endTime = tag + animTime
    local elapsedTime = now - tag
    local duration = endTime - tag
    local progress = elapsedTime / duration
    local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim)
   
    return a, b, c
end
 
fileDelete("intro_c.lua")
 
 
 
 
 
local sx, sy = guiGetScreenSize()
 
alpha = 250
MP = "files/1.png"
MX = sx
MY = sy
 
function adjIntro(adj)
    _, times = getTimerDetails(IntroTimer)
    if adj == "M1" then
        MX = (MX*0.95)+5
        MY = (MY*0.95)
        if times == 1 then
            setTimer(function()
                if (alpha <= 250) and not (alpha <= 0) then
                    alpha = alpha - 10
                else
                    IntroTimer = setTimer(adjIntro, 50, 26, "M2")
                end
            end, 50, 26)
        end
    elseif adj == "M2" then
        if (alpha < 250) and (alpha >= 0) then
            alpha = alpha + 10
        end
        MX = (MX/0.95)-5
        MY = (MY/0.95)
        MP = "files/2.png"
        if times == 1 then
            setTimer(function()
                MP = "files/3.png"
                setTimer(function()
                    IntroTimer = setTimer(adjIntro, 50, 26, "M3")
                end, 3500, 1)
            end, 4000, 1)
        end
    elseif adj == "M3" then
            MX = (MX*0.95)+5
            MY = (MY*0.95)
        if times == 1 then
            MP = "files/4.png"
            MX = (MX/0.95)-5
            MY = (MY/0.95)
            setTimer(function()
                setTimer(function()
                    if (alpha <= 250) and not (alpha <= 0) then
                        alpha = alpha - 10
                    else
                        removeEventHandler("onClientRender", root, drawIntro)
                        fadeCamera(true, 6, 0, 0, 0)
                        setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5)
                        dx = true
                        showCursor(true)
                        guiSetVisible(wnd, true)
                    end
                end, 50, 26)
            end, 3500, 1)
        end
    end
end
 
function drawIntro()
    dxDrawImage(sx/2-(MX/2), sy/2-(MY/2), MX, MY, MP, 0, 0, 0, tocolor(255, 255, 255, alpha))
end
 
function main()
    removeEventHandler ("onClientRender",root,Dx)
    fadeCamera(false);
    showChat(false)
    IntroSong = playSound ("files/Intro.mp3")
    showPlayerHudComponent("all", false)
    start = getTickCount()
    addEventHandler("onClientRender",getRootElement(),intro)
    setTimer ( function()
    removeEventHandler("onClientRender",getRootElement(),intro)
    IntroTimer = setTimer(adjIntro, 50, 26, "M1")
    addEventHandler("onClientRender", root, drawIntro)
    triggerEvent("onFinishIntro",getRootElement())
    setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5)
   
    guiSetInputEnabled(true)
 
    setElementDimension(localPlayer,0)
 
    setElementData(localPlayer,"new",false)
 
 
   
    end, 5000, 1 )
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main)
 
 
local screenW, screenH = guiGetScreenSize()
       
        wnd = guiCreateStaticImage((screenW - 800) / 2, (screenH - 534) / 2, 800, 534, "background.png", false)
 
        wndwo = guiCreateStaticImage(800 - 234 - 10, (567 - 258) / 2, 234, 258, "img.png", false, wnd)
 
        remember = guiCreateCheckBox(44, 159, 109, 18, "Remember Me !!", true, false, wndwo)
        login = guiCreateStaticImage(28, 191, 172, 47, "login.png", false, wndwo)
        logini = guiCreateStaticImage(2, 18, 41, 55, "login-ico.png", false, wndwo)
        locki = guiCreateStaticImage(2, 101, 41, 48, "lock-ico.png", false, wndwo)
        user_l = guiCreateEdit(44, 111, 176, 29, "", false, wndwo)
        pass_l = guiCreateEdit(43, 28, 176, 29, "", false, wndwo)
        label = guiCreateLabel(43, 0, 168, 24, "user ", false, wndwo)
        guiLabelSetHorizontalAlign(label, "center", false)
        guiLabelSetVerticalAlign(label, "center")
        label2 = guiCreateLabel(43, 77, 168, 24, "pas", false, wndwo)
        guiLabelSetHorizontalAlign(label2, "center", false)
        guiLabelSetVerticalAlign(label2, "center")
       
        logo = guiCreateStaticImage(10, (567 - 347) / 2, 235, 347, "img2.png", false, wnd)
 
        user1 = guiCreateEdit(53, 56, 162, 30, "", false, logo)
        pass1 = guiCreateEdit(54, 140, 162, 30, "", false, logo)
        pass1 = guiCreateEdit(58, 224, 162, 30, "", false, logo)
        lock = guiCreateStaticImage(10, 217, 44, 47, "lock-ico.png", false, logo)
        reg = guiCreateStaticImage(19, 279, 191, 45, "register2.png", false, logo)
        loginic = guiCreateStaticImage(10, 41, 42, 55, "login-ico.png", false, logo)
        lock5 = guiCreateStaticImage(10, 133, 44, 47, "lock-ico.png", false, logo)
        label6 = guiCreateLabel(10, 100, 206, 27, "pas", false, logo)
        guiLabelSetHorizontalAlign(label6, "center", false)
        guiLabelSetVerticalAlign(label6, "center")
        label7 = guiCreateLabel(9, 10, 206, 27, "user", false, logo)
        guiLabelSetHorizontalAlign(label7, "center", false)
        guiLabelSetVerticalAlign(label7, "center")
        label8 = guiCreateLabel(10, 184, 206, 27, "pas", false, logo)
        guiLabelSetHorizontalAlign(label8, "center", false)
        guiLabelSetVerticalAlign(label8, "center")    
 
 
            guiSetEnabled (wnd, false)
            centerWindow(wnd)
            triggerServerEvent("onGetSave",localPlayer)
     
            addEvent("onPutSave",true)
            addEventHandler("onPutSave",root,
                function (puser,ppass)
                   
Link to comment
ليش مايبي حد يساعدني

لان الاكواد الي جايبها الف كود

شوف في الديق بق يقلك سطر كم

وروح انسخه واكتبه لنا ونطلعلك الحل

والله دي بق مايقول

ولو كان بدّي بق كنت طلعت من زمان

دي بق لونة اصفر.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...