Jump to content

Como faço esse sistema de pesquisa ?


Recommended Posts

local DID = createElement("ID")

function PanelPrision()
dxDrawText("Nome: "..Nome, x*475, y*436.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.45, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Nome
    dxDrawText("Idade: 24", x*475, y*448.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.45, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Idade
    dxDrawText("Passaporte: "..IdPlayer.."", x*475, y*460.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.45, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Passaporte
    dxDrawText("Sexo: Masculino", x*475, y*472.2, x*16, y*16, tocolor(255, 255, 255, 255), 0.45, infinity.Fonte01, "left", "top", false, false, false, true, false) --- Sexo

if cursorPosition(x*595, y*320, x*100, y*20) then
    dxDrawRoundedRectangle(x*595, y*320, x*100, y*20, tocolor(64, 64, 64, 255), 2) --- Escrever ID
    else
    dxDrawRoundedRectangle(x*595, y*320, x*100, y*20, tocolor(54, 54, 54, 255), 2) --- Escrever ID
    end
    dxDrawText("ID:", x*604, y*322, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Escrever ID
    
    dxDrawEditBox("", x*616, y*319, x*100, y*20, false, 5, DID)
end

Painel = false

function OpenPanel()
    if Painel == false then
        addEventHandler("onClientRender", root, PanelPrision)
        Painel = true
        showCursor(true)
        Pos = {
            [1] = {1,595, 362, 230, 20},
            [2] = {2,595, 382, 230, 20},
            [3] = {3,595, 402, 230, 20},
            [4] = {4,595, 422, 230, 20},
            [5] = {5,595, 442, 230, 20},
            [6] = {6,595, 462, 230, 20},
        }
        Selecionado = 0
    end
end
addEvent("Prison", true)
addEventHandler("Prison", root, OpenPanel)

function Close()
    if Painel == true then
        if cursorPosition(x*858.4, y*308, x*16, y*16) then
            removeEventHandler("onClientRender", root, PanelPrision)
            Painel = false
            showCursor(false)
        end
    end
end
addEventHandler("onClientClick", root, Close)

function ClickButton (button, state)
    if Painel == true then
        if button == "left" and state == "down" then
            if cursorPosition(x*616, y*318.5, x*100, y*20) then
                setElementData(DID, "state", true)
            end
        end
    end
end
addEventHandler("onClientClick", root, ClickButton)


------------- Server -----------

local marker = createMarker(Edit[2][1], Edit[2][2], Edit[2][3] -1, "cylinder", 1.10, Edit[3][1], Edit[3][2], Edit[3][3], Edit[3][4])
setElementData(marker, "infinity:custom", true)

--==================================== Função ====================================--

function OpenPanel(thePlayer)
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup (Edit[1][1])) then
        triggerClientEvent(thePlayer, "Prison", thePlayer)
        exports['infinity_infobox']:showInfobox(thePlayer, Edit[5][1], "success")
    else
        exports['infinity_infobox']:showInfobox(thePlayer, Edit[4][1], "error")
    end
end
addEventHandler("onMarkerHit", marker, OpenPanel)

Rapaziada, estou fazendo um script aqui de prisão e preciso fazer um sistema que quando escrever o ID da pessoa ira aparecer as informações dela, se alguem poder me ajudar, pois nao sei como comecar a fazer quando escrever o id aparecer

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