Jump to content

Sistema de Identidade


Recommended Posts

local Nome = createElement("InfinityEdit")
local Idade = createElement("InfinityEdit")
local Sexo = createElement("InfinityEdit")

function Registro()
  	dxDrawText("Nome:", x*524, y*420.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Nome
    dxDrawText("Passaporte: "..SeuID, x*524, y*432.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Passaporte
    dxDrawText("Sexo:", x*524, y*456.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "left", "top", false, false, false, true, false) --- Sexo
    dxDrawText("Idade:", x*524, y*444.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Idade
  
	dxDrawEditBox("", x*555, y*420.2, x*90, y*14, false, 10, Nome)
    dxDrawEditBox("", x*553, y*444.2, x*90, y*14, false, 2, Idade)
    dxDrawEditBox("", x*548, y*457, x*90, y*14, false, 9, Sexo)
end


--==================================== Painel DX ====================================--

Painel = false

function AbrirPainel()
    if Painel == false then
        addEventHandler("onClientRender", root, Registro)
        Painel = true
        showCursor(true)
    end
end
addEvent("Registro", true)
addEventHandler("Registro", root, AbrirPainel)

function FecharPainel()
    if Painel == true then
        if cursorPosition (x*820, y*308, x*16, y*16) then
            removeEventHandler("onClientRender", root, Registro)
            Painel = false
            setElementData(Nome,"state",false)
            setElementData(Idade,"state",false)
            setElementData(Sexo,"state",false)
            showCursor(false)
        end
    end
end
addEventHandler("onClientClick", root, FecharPainel)

--==================================== Funções ====================================--

function ClickButton(button, state)
    if Painel == true then
        if button == "left" and state == "down" then
            if cursorPosition (x*554, y*420.2, x*16, y*16) then
                setElementData(Nome,"state",true)
            else
                setElementData(Nome,"state",false)
            end

            if cursorPosition (x*553, y*444.2, x*90, y*14) then
                setElementData(Idade,"state",true)
            else
                setElementData(Idade,"state",false)
            end

            if cursorPosition (x*548, y*457, x*90, y*14) then
                setElementData(Sexo,"state",true)
            else
                setElementData(Sexo,"state",false)
            end
        end
    end
end
addEventHandler("onClientClick", root, ClickButton)

Olá, rapaziada estou fazendo um sistema de Identidade e estou fazendo por dxDrawEditBox, e eu dei uma estudadinha sobre os sistemas de identidade mas não entendi muito, se alguem puder me dar um começo doque fazer agradeço, obrigado pela atenção rapaziada

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...