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

Wysłany: 2018-09-06, 20:39


trojkatdwanasci







Wiek: 33
Na forum: 2907 dni
Posty: 50
Nick w MP: Brak

Piwa: 301

Respekt: 50

Chodz aby rozdzielczo?? si? dopasowywa?a bo jednak ka?dy ma inny monitor...

[ Dodano: 2018-09-06, 20:40 ]
Tak, aby by? na ca?ej rozdzielczo?ci, i si? dopasowywa?... Bo jeden ma 640 drugi 1920 itp itp

Podpis
RCRP (Red County Role Play) - Nowy projekt. W czasie prac.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 20:48


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Sprawd? ten kod:



local sWsH guiGetScreenSize()
local x 1360
local y 768
--  /x) * sW, /y) * sH

local sm = {}
sm.moov 0
sm.object1sm.object2 nilnil
 
 
local function camRender ()
    local x1y1z1 getElementPosition sm.object1 )
    local x2y2z2 getElementPosition sm.object2 )
    setCameraMatrix x1y1z1x2y2z2 )
end
 
local function removeCamHandler ()
    if(sm.moov == 1then
        sm.moov 0
        removeEventHandler "onClientPreRender"getRootElement(), camRender )
    end
end

function smoothMoveCameraa x1y1z1x1ty1tz1tx2y2z2x2ty2tz2ttime )
    if(sm.moov == 1then return false end
    sm.object1 createObject 1337x1y1z1 )
    sm.object2 createObject 1337x1ty1tz1t )
    setElementAlpha sm.object1)
    setElementAlpha sm.object2)
    setObjectScale(sm.object10.01)
    setObjectScale(sm.object20.01)
    moveObject sm.object1timex2y2z2000"InOutQuad" )
    moveObject sm.object2timex2ty2tz2t000"InOutQuad" )
 
    addEventHandler "onClientPreRender"getRootElement(), camRender )
    sm.moov 1
    setTimer removeCamHandlertime)
    setTimer destroyElementtime1sm.object1 )
    setTimer destroyElementtime1sm.object2 )
    return true
end

local logowanie guiCreateLabel(0.770.410.180.05""true)
local rejka guiCreateLabel(0.770.490.180.05""true)
local login guiCreateEdit(0.380.420.160.04""true)
local haslo guiCreateEdit(0.380.500.160.04""true)   
    guiEditSetMasked(haslotrue) 
    guiSetVisible(logowaniefalse)
    guiSetVisible(rejkafalse)
    guiSetVisible(loginfalse)
    guiSetVisible(haslofalse)

local blad guiCreateLabel(0.000.571.000.05""true)
    guiSetAlpha(blad0.7)
    guiLabelSetColor(blad02550)
    guiLabelSetHorizontalAlign(blad"center"false)
    guiLabelSetVerticalAlign(blad"center")  
    guiSetVisible(bladfalse)
    
local bladpostaci guiCreateLabel(0.000.381.000.05""true)
    guiSetAlpha(bladpostaci0.7)
    guiLabelSetColor(bladpostaci02550)
    guiLabelSetHorizontalAlign(bladpostaci"center"false)
    guiLabelSetVerticalAlign(bladpostaci"center")      
    guiSetVisible(bladpostacifalse)    

local Imie guiCreateEdit(53731032532""false)
local Wiek guiCreateEdit(6833974132""false)
    guiSetVisible(Imiefalse)
    guiSetVisible(Wiekfalse)
    
local stworzpostac guiCreateLabel(0.5350.330.1550.04""true)
    guiSetVisible(stworzpostacfalse)    
    
function gui1()
    dxDrawRectangle(sW 0.000sH 0.345sW 1.000sH 0.281tocolor(000200), false)
    dxDrawText("Login Gracza:"sW 0.215sH 0.418sW 0.366sH 0.456tocolor(0100100255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Has?o Gracza:"sW 0.215sH 0.499sW 0.366sH 0.536tocolor(0100100255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawLine(sW 0.215sH 0.536sW 0.366sH 0.536tocolor(0100100255), 2false)
    dxDrawLine(sW 0.215sH 0.456sW 0.366sH 0.456tocolor(0100100255), 2false)
    dxDrawRectangle(sW 0.771sH 0.409sW 0.177sH 0.053tocolor(0100100200), false)
    dxDrawRectangle(sW 0.771sH 0.492sW 0.177sH 0.053tocolor(0100100200), false)
    dxDrawText("Zaloguj"sW 0.770sH 0.408sW 0.948sH 0.462tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Zarejestruj"sW 0.770sH 0.491sW 0.948sH 0.546tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
end

function panel_tworzenia()
    dxDrawRectangle(sW*0/1920sH*272/1080sW*1920/1920sH*207/1080tocolor(000200), false)
    dxDrawText("IMIE_NAZWISKO\n\n\n       WIEK"sW*585/1920sH*276/1080sW*962/1920sH*300/1080tocolor(254254254200), 1.00"bankgothic""left""top"falsefalsefalsefalsefalse)
    dxDrawRectangle(sW*1033/1920sH*360/1080sW*291/1920sH*31/1080tocolor(0100100200), false)
    dxDrawText("Stw?rz Posta?"sW*1135/1920sH*368/1080sW*1339/1920sH*391/1080tocolor(255255255255), 1.00"default""left""top"falsefalsefalsefalsefalse)
end

addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()), function()
    smoothMoveCameraa(648.00696, -1400.3413125.43704810.72760, -1400.4517825.53072,1045.97888, -1400.8480225.44975,1329.71045, -1400.4044225.4113042000 )
    showChat(false)
    setPlayerHudComponentVisible("all",false)
    guiSetVisible(logowanietrue)
    guiSetVisible(rejkatrue)
    guiSetVisible(logintrue)
    guiSetVisible(haslotrue)
    guiSetVisible(bladtrue)
    showCursor(true)
    addEventHandler("onClientRender"rootgui1)
    fadeCamera(true)
end)    

addEventHandler("onClientGUIClick"logowanie, function(button)
    if (button ~= "left"then return end
        triggerServerEvent("onRequestLogin"getLocalPlayer(), guiGetText(login), guiGetText(haslo))
end)

addEventHandler ("onClientGUIClick"rejka, function(button)
    if (button ~= "left"then return end
        triggerServerEvent("onRequestRegister"getLocalPlayer(), guiGetText(login), guiGetText(haslo))
end)

addEventHandler ("onClientGUIClick"stworzpostac, function(button)
    if (button ~= "left"then return end
        if guiGetText(Wiek) == "" or string.len(tonumber(guiGetText(Wiek))) > 2 then triggerEvent("bladPostaci"localPlayer"Podaj wiek!") return end
            if guiGetText(Imie) == "" or string.len(tostring(guiGetText(Imie))) > 17 or string.len(tostring(guiGetText(Imie))) < 6 then triggerEvent("bladPostaci"localPlayer"Podaj imie i nazwisko!") return end
                triggerServerEvent("savePlayer"getLocalPlayer(), tostring(guiGetText(Imie)), tonumber(guiGetText(Wiek)))
                
end)

addEvent('show:panel_tworzenia',true)
addEventHandler('show:panel_tworzenia'getRootElement(), function()
    removeEventHandler("onClientRender"rootgui1)
        guiSetVisible (logowaniefalse)
        guiSetVisible (rejkafalse)
        guiSetVisible (loginfalse)
        guiSetVisible (haslofalse)
        guiSetVisible (bladfalse)    
    
    addEventHandler('onClientRender'getRootElement(), panel_tworzenia)
        guiSetVisible(Imietrue)
        guiSetVisible(Wiektrue)
        guiSetVisible(stworzpostactrue)
        guiSetVisible(bladpostacitrue)
end)

addEvent("hide:loginpanel"true)
addEventHandler("hide:loginpanel"getRootElement(), function()
    setCameraTarget(localPlayer)
    setPlayerHudComponentVisible("all"true)
    removeEventHandler("onClientRender"rootgui1)
        guiSetVisible (logowaniefalse)
        guiSetVisible (rejkafalse)
        guiSetVisible (loginfalse)
        guiSetVisible (haslofalse)
        guiSetVisible (bladfalse)    
    showChat(true)
    showCursor(false)
    removeCamHandler()
end)

addEvent("hide:panel_tworzenia"true)
addEventHandler("hide:panel_tworzenia"getRootElement(), function()
    setCameraTarget(localPlayer)
    setPlayerHudComponentVisible("all"true)
    guiSetVisible(Imiefalse)
    guiSetVisible(Wiekfalse)
    guiSetVisible(stworzpostacfalse)
    guiSetVisible(bladpostacifalse)    
    showChat(true)
    showCursor(false)
    removeCamHandler()
    removeEventHandler("onClientRender"rootpanel_tworzenia)
end)

addEvent("bladLogowania"true)
addEventHandler("bladLogowania"getRootElement(), function(komunikat)
    if not komunikat then return end
        guiSetText(bladtostring(komunikat))
end)

addEvent("bladPostaci"true)
addEventHandler("bladPostaci"getRootElement(), function(komunikat)
    if not komunikat then return end
        guiSetText(bladpostacitostring(komunikat))
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 21:00


trojkatdwanasci







Wiek: 33
Na forum: 2907 dni
Posty: 50
Nick w MP: Brak

Piwa: 301

Respekt: 50

Og?lnie, gui tworzenia si? rozsypa?o pasek u g?ry, edit boxy na dole, text pomi?dzy lol lol lol lol



Podpis
RCRP (Red County Role Play) - Nowy projekt. W czasie prac.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 21:05


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Wybacz, nie zauwa?y?em, ?e te edit boxy jeszcze nie maj? skalowania. ; P

C-SIDE



local sWsH guiGetScreenSize()
local x 1360
local y 768
--  /x) * sW, /y) * sH

local sm = {}
sm.moov 0
sm.object1sm.object2 nilnil
 
 
local function camRender ()
    local x1y1z1 getElementPosition sm.object1 )
    local x2y2z2 getElementPosition sm.object2 )
    setCameraMatrix x1y1z1x2y2z2 )
end
 
local function removeCamHandler ()
    if(sm.moov == 1then
        sm.moov 0
        removeEventHandler "onClientPreRender"getRootElement(), camRender )
    end
end

function smoothMoveCameraa x1y1z1x1ty1tz1tx2y2z2x2ty2tz2ttime )
    if(sm.moov == 1then return false end
    sm.object1 createObject 1337x1y1z1 )
    sm.object2 createObject 1337x1ty1tz1t )
    setElementAlpha sm.object1)
    setElementAlpha sm.object2)
    setObjectScale(sm.object10.01)
    setObjectScale(sm.object20.01)
    moveObject sm.object1timex2y2z2000"InOutQuad" )
    moveObject sm.object2timex2ty2tz2t000"InOutQuad" )
 
    addEventHandler "onClientPreRender"getRootElement(), camRender )
    sm.moov 1
    setTimer removeCamHandlertime)
    setTimer destroyElementtime1sm.object1 )
    setTimer destroyElementtime1sm.object2 )
    return true
end

local logowanie guiCreateLabel(0.770.410.180.05""true)
local rejka guiCreateLabel(0.770.490.180.05""true)
local login guiCreateEdit(0.380.420.160.04""true)
local haslo guiCreateEdit(0.380.500.160.04""true)   
    guiEditSetMasked(haslotrue) 
    guiSetVisible(logowaniefalse)
    guiSetVisible(rejkafalse)
    guiSetVisible(loginfalse)
    guiSetVisible(haslofalse)

local blad guiCreateLabel(0.000.571.000.05""true)
    guiSetAlpha(blad0.7)
    guiLabelSetColor(blad02550)
    guiLabelSetHorizontalAlign(blad"center"false)
    guiLabelSetVerticalAlign(blad"center")  
    guiSetVisible(bladfalse)
    
local bladpostaci guiCreateLabel(0.000.381.000.05""true)
    guiSetAlpha(bladpostaci0.7)
    guiLabelSetColor(bladpostaci02550)
    guiLabelSetHorizontalAlign(bladpostaci"center"false)
    guiLabelSetVerticalAlign(bladpostaci"center")      
    guiSetVisible(bladpostacifalse)    

local Imie guiCreateEdit(sW*537/1920sH*310/1080sW*325/1920sH*32/1080""false)
local Wiek guiCreateEdit(sW*683/1920sH*397/1080sW*41/1920sH*32/1080""false)
    guiSetVisible(Imiefalse)
    guiSetVisible(Wiekfalse)
    
local stworzpostac guiCreateLabel(0.5350.330.1550.04""true)
    guiSetVisible(stworzpostacfalse)    

function gui1()
    dxDrawRectangle(sW 0.000sH 0.345sW 1.000sH 0.281tocolor(000200), false)
    dxDrawText("Login Gracza:"sW 0.215sH 0.418sW 0.366sH 0.456tocolor(0100100255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Has?o Gracza:"sW 0.215sH 0.499sW 0.366sH 0.536tocolor(0100100255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawLine(sW 0.215sH 0.536sW 0.366sH 0.536tocolor(0100100255), 2false)
    dxDrawLine(sW 0.215sH 0.456sW 0.366sH 0.456tocolor(0100100255), 2false)
    dxDrawRectangle(sW 0.771sH 0.409sW 0.177sH 0.053tocolor(0100100200), false)
    dxDrawRectangle(sW 0.771sH 0.492sW 0.177sH 0.053tocolor(0100100200), false)
    dxDrawText("Zaloguj"sW 0.770sH 0.408sW 0.948sH 0.462tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Zarejestruj"sW 0.770sH 0.491sW 0.948sH 0.546tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
end

function panel_tworzenia()
    dxDrawRectangle(sW*0/1920sH*272/1080sW*1920/1920sH*207/1080tocolor(000200), false)
    dxDrawText("IMIE_NAZWISKO\n\n\n       WIEK"sW*585/1920sH*276/1080sW*962/1920sH*300/1080tocolor(254254254200), 1.00"bankgothic""left""top"falsefalsefalsefalsefalse)
    dxDrawRectangle(sW*1033/1920sH*360/1080sW*291/1920sH*31/1080tocolor(0100100200), false)
    dxDrawText("Stw?rz Posta?"sW*1135/1920sH*368/1080sW*1339/1920sH*391/1080tocolor(255255255255), 1.00"default""left""top"falsefalsefalsefalsefalse)
end

addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()), function()
    smoothMoveCameraa(648.00696, -1400.3413125.43704810.72760, -1400.4517825.53072,1045.97888, -1400.8480225.44975,1329.71045, -1400.4044225.4113042000 )
    showChat(false)
    setPlayerHudComponentVisible("all",false)
    guiSetVisible(logowanietrue)
    guiSetVisible(rejkatrue)
    guiSetVisible(logintrue)
    guiSetVisible(haslotrue)
    guiSetVisible(bladtrue)
    showCursor(true)
    addEventHandler("onClientRender"rootgui1)
    fadeCamera(true)
end)    

addEventHandler("onClientGUIClick"logowanie, function(button)
    if (button ~= "left"then return end
        triggerServerEvent("onRequestLogin"getLocalPlayer(), guiGetText(login), guiGetText(haslo))
end)

addEventHandler ("onClientGUIClick"rejka, function(button)
    if (button ~= "left"then return end
        triggerServerEvent("onRequestRegister"getLocalPlayer(), guiGetText(login), guiGetText(haslo))
end)

addEventHandler ("onClientGUIClick"stworzpostac, function(button)
    if (button ~= "left"then return end
        if guiGetText(Wiek) == "" or string.len(tonumber(guiGetText(Wiek))) > 2 then triggerEvent("bladPostaci"localPlayer"Podaj wiek!") return end
            if guiGetText(Imie) == "" or string.len(tostring(guiGetText(Imie))) > 17 or string.len(tostring(guiGetText(Imie))) < 6 then triggerEvent("bladPostaci"localPlayer"Podaj imie i nazwisko!") return end
                triggerServerEvent("savePlayer"getLocalPlayer(), tostring(guiGetText(Imie)), tonumber(guiGetText(Wiek)))
                
end)

addEvent('show:panel_tworzenia',true)
addEventHandler('show:panel_tworzenia'getRootElement(), function()
    removeEventHandler("onClientRender"rootgui1)
        guiSetVisible (logowaniefalse)
        guiSetVisible (rejkafalse)
        guiSetVisible (loginfalse)
        guiSetVisible (haslofalse)
        guiSetVisible (bladfalse)    
    
    addEventHandler('onClientRender'getRootElement(), panel_tworzenia)
        guiSetVisible(Imietrue)
        guiSetVisible(Wiektrue)
        guiSetVisible(stworzpostactrue)
        guiSetVisible(bladpostacitrue)
end)

addEvent("hide:loginpanel"true)
addEventHandler("hide:loginpanel"getRootElement(), function()
    setCameraTarget(localPlayer)
    setPlayerHudComponentVisible("all"true)
    removeEventHandler("onClientRender"rootgui1)
        guiSetVisible (logowaniefalse)
        guiSetVisible (rejkafalse)
        guiSetVisible (loginfalse)
        guiSetVisible (haslofalse)
        guiSetVisible (bladfalse)    
    showChat(true)
    showCursor(false)
    removeCamHandler()
end)

addEvent("hide:panel_tworzenia"true)
addEventHandler("hide:panel_tworzenia"getRootElement(), function()
    setCameraTarget(localPlayer)
    setPlayerHudComponentVisible("all"true)
    guiSetVisible(Imiefalse)
    guiSetVisible(Wiekfalse)
    guiSetVisible(stworzpostacfalse)
    guiSetVisible(bladpostacifalse)    
    showChat(true)
    showCursor(false)
    removeCamHandler()
    removeEventHandler("onClientRender"rootpanel_tworzenia)
end)

addEvent("bladLogowania"true)
addEventHandler("bladLogowania"getRootElement(), function(komunikat)
    if not komunikat then return end
        guiSetText(bladtostring(komunikat))
end)

addEvent("bladPostaci"true)
addEventHandler("bladPostaci"getRootElement(), function(komunikat)
    if not komunikat then return end
        guiSetText(bladpostacitostring(komunikat))
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 21:08


trojkatdwanasci







Wiek: 33
Na forum: 2907 dni
Posty: 50
Nick w MP: Brak

Piwa: 301

Respekt: 50

Wilq, coraz bli?ej sukcesu, niby m?g?bym to samemu zrobi? ale na skalowaniu nie znam si? bardziej ni? na LUA

Podpis
RCRP (Red County Role Play) - Nowy projekt. W czasie prac.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 21:23


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Nie jestem pewien, ale spr?buj:

C-SIDE



local sWsH guiGetScreenSize()
local x 1360
local y 768
--  /x) * sW, /y) * sH

local sm = {}
sm.moov 0
sm.object1sm.object2 nilnil
 
 
local function camRender ()
    local x1y1z1 getElementPosition sm.object1 )
    local x2y2z2 getElementPosition sm.object2 )
    setCameraMatrix x1y1z1x2y2z2 )
end
 
local function removeCamHandler ()
    if(sm.moov == 1then
        sm.moov 0
        removeEventHandler "onClientPreRender"getRootElement(), camRender )
    end
end

function smoothMoveCameraa x1y1z1x1ty1tz1tx2y2z2x2ty2tz2ttime )
    if(sm.moov == 1then return false end
    sm.object1 createObject 1337x1y1z1 )
    sm.object2 createObject 1337x1ty1tz1t )
    setElementAlpha sm.object1)
    setElementAlpha sm.object2)
    setObjectScale(sm.object10.01)
    setObjectScale(sm.object20.01)
    moveObject sm.object1timex2y2z2000"InOutQuad" )
    moveObject sm.object2timex2ty2tz2t000"InOutQuad" )
 
    addEventHandler "onClientPreRender"getRootElement(), camRender )
    sm.moov 1
    setTimer removeCamHandlertime)
    setTimer destroyElementtime1sm.object1 )
    setTimer destroyElementtime1sm.object2 )
    return true
end

local logowanie guiCreateLabel(0.770.410.180.05""true)
local rejka guiCreateLabel(0.770.490.180.05""true)
local login guiCreateEdit(0.380.420.160.04""true)
local haslo guiCreateEdit(0.380.500.160.04""true)   
    guiEditSetMasked(haslotrue) 
    guiSetVisible(logowaniefalse)
    guiSetVisible(rejkafalse)
    guiSetVisible(loginfalse)
    guiSetVisible(haslofalse)

local blad guiCreateLabel(0.000.571.000.05""true)
    guiSetAlpha(blad0.7)
    guiLabelSetColor(blad02550)
    guiLabelSetHorizontalAlign(blad"center"false)
    guiLabelSetVerticalAlign(blad"center")  
    guiSetVisible(bladfalse)
    
local bladpostaci guiCreateLabel(0.000.381.000.05""true)
    guiSetAlpha(bladpostaci0.7)
    guiLabelSetColor(bladpostaci02550)
    guiLabelSetHorizontalAlign(bladpostaci"center"false)
    guiLabelSetVerticalAlign(bladpostaci"center")      
    guiSetVisible(bladpostacifalse)    

local Imie guiCreateEdit(sW*537/1920sH*310/1080sW*325/1920sH*32/1080""false)
local Wiek guiCreateEdit(sW*683/1920sH*397/1080sW*41/1920sH*32/1080""false)
    guiSetVisible(Imiefalse)
    guiSetVisible(Wiekfalse)
    
local stworzpostac guiCreateLabel(0.5350.330.1550.04""true)
    guiSetVisible(stworzpostacfalse)    
local scaleX sW/1920 

function gui1()
    dxDrawRectangle(sW 0.000sH 0.345sW 1.000sH 0.281tocolor(000200), false)
    dxDrawText("Login Gracza:"sW 0.215sH 0.418sW 0.366sH 0.456tocolor(0100100255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Has?o Gracza:"sW 0.215sH 0.499sW 0.366sH 0.536tocolor(0100100255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawLine(sW 0.215sH 0.536sW 0.366sH 0.536tocolor(0100100255), 2false)
    dxDrawLine(sW 0.215sH 0.456sW 0.366sH 0.456tocolor(0100100255), 2false)
    dxDrawRectangle(sW 0.771sH 0.409sW 0.177sH 0.053tocolor(0100100200), false)
    dxDrawRectangle(sW 0.771sH 0.492sW 0.177sH 0.053tocolor(0100100200), false)
    dxDrawText("Zaloguj"sW 0.770sH 0.408sW 0.948sH 0.462tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Zarejestruj"sW 0.770sH 0.491sW 0.948sH 0.546tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
end

function panel_tworzenia()
    dxDrawRectangle(sW*0/1920sH*272/1080sW*1920/1920sH*207/1080tocolor(000200), false)
    dxDrawText("IMIE_NAZWISKO\n\n\n       WIEK"sW*585/1920sH*276/1080sW*962/1920sH*300/1080tocolor(254254254200), scaleX"bankgothic""left""top"falsefalsefalsefalsefalse)
    dxDrawRectangle(sW*1033/1920sH*360/1080sW*291/1920sH*31/1080tocolor(0100100200), false)
    dxDrawText("Stw?rz Posta?"sW*1135/1920sH*368/1080sW*1339/1920sH*391/1080tocolor(255255255255), 1.00"default""left""top"falsefalsefalsefalsefalse)
end

addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()), function()
    smoothMoveCameraa(648.00696, -1400.3413125.43704810.72760, -1400.4517825.53072,1045.97888, -1400.8480225.44975,1329.71045, -1400.4044225.4113042000 )
    showChat(false)
    setPlayerHudComponentVisible("all",false)
    guiSetVisible(logowanietrue)
    guiSetVisible(rejkatrue)
    guiSetVisible(logintrue)
    guiSetVisible(haslotrue)
    guiSetVisible(bladtrue)
    showCursor(true)
    addEventHandler("onClientRender"rootgui1)
    fadeCamera(true)
end)    

addEventHandler("onClientGUIClick"logowanie, function(button)
    if (button ~= "left"then return end
        triggerServerEvent("onRequestLogin"getLocalPlayer(), guiGetText(login), guiGetText(haslo))
end)

addEventHandler ("onClientGUIClick"rejka, function(button)
    if (button ~= "left"then return end
        triggerServerEvent("onRequestRegister"getLocalPlayer(), guiGetText(login), guiGetText(haslo))
end)

addEventHandler ("onClientGUIClick"stworzpostac, function(button)
    if (button ~= "left"then return end
        if guiGetText(Wiek) == "" or string.len(tonumber(guiGetText(Wiek))) > 2 then triggerEvent("bladPostaci"localPlayer"Podaj wiek!") return end
            if guiGetText(Imie) == "" or string.len(tostring(guiGetText(Imie))) > 17 or string.len(tostring(guiGetText(Imie))) < 6 then triggerEvent("bladPostaci"localPlayer"Podaj imie i nazwisko!") return end
                triggerServerEvent("savePlayer"getLocalPlayer(), tostring(guiGetText(Imie)), tonumber(guiGetText(Wiek)))
                
end)

addEvent('show:panel_tworzenia',true)
addEventHandler('show:panel_tworzenia'getRootElement(), function()
    removeEventHandler("onClientRender"rootgui1)
        guiSetVisible (logowaniefalse)
        guiSetVisible (rejkafalse)
        guiSetVisible (loginfalse)
        guiSetVisible (haslofalse)
        guiSetVisible (bladfalse)    
    
    addEventHandler('onClientRender'getRootElement(), panel_tworzenia)
        guiSetVisible(Imietrue)
        guiSetVisible(Wiektrue)
        guiSetVisible(stworzpostactrue)
        guiSetVisible(bladpostacitrue)
end)

addEvent("hide:loginpanel"true)
addEventHandler("hide:loginpanel"getRootElement(), function()
    setCameraTarget(localPlayer)
    setPlayerHudComponentVisible("all"true)
    removeEventHandler("onClientRender"rootgui1)
        guiSetVisible (logowaniefalse)
        guiSetVisible (rejkafalse)
        guiSetVisible (loginfalse)
        guiSetVisible (haslofalse)
        guiSetVisible (bladfalse)    
    showChat(true)
    showCursor(false)
    removeCamHandler()
end)

addEvent("hide:panel_tworzenia"true)
addEventHandler("hide:panel_tworzenia"getRootElement(), function()
    setCameraTarget(localPlayer)
    setPlayerHudComponentVisible("all"true)
    guiSetVisible(Imiefalse)
    guiSetVisible(Wiekfalse)
    guiSetVisible(stworzpostacfalse)
    guiSetVisible(bladpostacifalse)    
    showChat(true)
    showCursor(false)
    removeCamHandler()
    removeEventHandler("onClientRender"rootpanel_tworzenia)
end)

addEvent("bladLogowania"true)
addEventHandler("bladLogowania"getRootElement(), function(komunikat)
    if not komunikat then return end
        guiSetText(bladtostring(komunikat))
end)

addEvent("bladPostaci"true)
addEventHandler("bladPostaci"getRootElement(), function(komunikat)
    if not komunikat then return end
        guiSetText(bladpostacitostring(komunikat))
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 21:27


trojkatdwanasci







Wiek: 33
Na forum: 2907 dni
Posty: 50
Nick w MP: Brak

Piwa: 301

Respekt: 50

Wilq, teraz idealnie mi wyskalowa?o, nie czepiam si? nawet tego lekko na prawo napisu stw?rz posta?, lecz ostateczne pytanie brzmi czy b?dzie to tak samo wygl?da? na innych monitorach? czy to jest zrobione tylko pod moj? rozdzielczo???

[ Dodano: 2018-09-06, 21:27 ]


Podpis
RCRP (Red County Role Play) - Nowy projekt. W czasie prac.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 21:30


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Zawsze to mo?esz sam sobie dopasowa? - nie zaszkodzi spr?bowa? oczywi?cie.

Tak, na ka?dej b?dzie tak samo. Tutaj masz z mojej perspektywy, rozdzielczo?? 1920x1080





Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-06, 21:35


trojkatdwanasci







Wiek: 33
Na forum: 2907 dni
Posty: 50
Nick w MP: Brak

Piwa: 301

Respekt: 50

Wilq, Dzi?kuje ci za pomoc! :) b?d? si? jeszcze bawi? z rozdzielczo?ci? ;P (wiadomo trzeba da? co? od siebie) przy starcie serwera wspomn? o twojej pomocy przy panelu ! :D to na tyle.


@Mo?na zamkn??

Podpis
RCRP (Red County Role Play) - Nowy projekt. W czasie prac.
Postaw piwo autorowi tego posta
 

 
Tagi: panel :: logowania/tworzenia
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Panel Logowania/tworzenia Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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