Jump to content

Alguem me ajuda Porfavor


Recommended Posts

--- Painel DX

function Painel()
for i = 1,#Pos do
            if #Edit["Artigos"] >= Pos[i][1] then
                local Index = Pos[i][1]
                if Selecionado == Index then
                dxDrawRoundedRectangle(x*Pos[i][2],y*Pos[i][3],x*Pos[i][4],y*Pos[i][5], tocolor(64, 105, 225, 255), 2) --- Fundo Artigos
            else
                dxDrawRoundedRectangle(x*Pos[i][2],y*Pos[i][3],x*Pos[i][4],y*Pos[i][5], tocolor(54, 54, 54, 255), 2) --- Fundo Artigos
            end
        end
    end

    dxDrawText(""..Edit["Artigos"][Opcao2][1].."", x*1400, y*384, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "center", "top", false, false, false, false, false) --- Artigo
    dxDrawText(""..Edit["Artigos"][Opcao1][1].."", x*1400, y*364, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "center", "top", false, false, false, false, false) --- Artigo
    dxDrawText(""..Edit["Artigos"][Opcao3][1].."", x*1400, y*404, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "center", "top", false, false, false, false, false) --- Artigo
    dxDrawText(""..Edit["Artigos"][Opcao4][1].."", x*1400, y*424, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "center", "top", false, false, false, false, false) --- Artigo
    dxDrawText(""..Edit["Artigos"][Opcao5][1].."", x*1400, y*444, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "center", "top", false, false, false, false, false) --- Artigo
    dxDrawText(""..Edit["Artigos"][Opcao6][1].."", x*1400, y*464, x*16, y*16, tocolor(255, 255, 255, 255), 0.50, infinity.Fonte01, "center", "top", false, false, false, false, false) --- Artigo
dxDrawText("Adicionar", x*600, y*344, x*16, y*16, tocolor(255, 255, 255, 255), 0.45, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Adicionar
    dxDrawText("Remover", x*780, y*344, x*16, y*16, tocolor(255, 255, 255, 255), 0.45, infinity.Fonte01, "left", "top", false, false, false, false, false) --- Remover
end

---------- Abrir Painel ------
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)
            IDPlayer = {}
            Painel = false
            setElementData(DID, "state", false)
            setElementData (DID, "text", "")
            showCursor(false)
        end
    end
end
addEventHandler("onClientClick", root, Close)

--------------- (Sistema de selecionar o DX que fica o artigo, e nao o artigo em si)

function SelecionarPos(button, state)
    if Painel == true then
        if button == "left" and state == "down" then
            for i = 1,#Pos do
                if cursorPosition (x*Pos[i][2],y*Pos[i][3],x*Pos[i][4],y*Pos[i][5]) then
                    if Selecionado ~= Pos[i][1] then
                        Selecionado = Pos[i][1]
                    else
                        Selecionado = 0
                    end
                end
            end
        end
    end
end
addEventHandler("onClientClick",root,SelecionarPos)


--------- Meu Edit ---------

Edit = {
    {"Policial"}, --- Acl
    {1531.79126, -1671.59375, 13.38281}, --- Posição Marker
    {255, 255, 255, 255}, --- Cor Marker
    {"Torne-se um policial para ter acesso a este local"}, --- Mensagem Erro
    {"Painel de apreensão aberto com sucesso"}, --- Mensagem Sucesso
    ["Artigos"] = {
        {"Porte Ilegal - Art. 16°", 20}, --- Artigo, Tempo
        {"Furto - Art. 155°", 20}, --- Artigo, Tempo
        {"Roubo a Mão Armada - Art. 157°", 20}, --- Artigo, Tempo
        {"Trafico de Armas - Art.87°", 20}, --- Artigo, Tempo
        {"Formação de Quadrilha - Art. 288°", 20}, --- Artigo, Tempo
        {"Negociação de Armas - Art. 180°", 20}, --- Artigo, Tempo
        {"Trafico de Drogas - Art. 33°", 20}, --- Artigo, Tempo
        {"Ameaça - Art. 147°", 20}, --- Artigo, Tempo
        {"Suborno - Art. 333°", 20}, --- Artigo, Tempo
        {"Alta Velocidade - Art. 218°", 20}, --- Artigo, Tempo
        {"Tentativa de Fuga - Art. 329°", 20}, --- Artigo, Tempo
        {"Direção Perigosa - Art. 175°", 20}, --- Artigo, Tempo
        {"Corrida Ilegal - Art. 173°", 20}, --- Artigo, Tempo
        {"Obstrução de Via Publica - Art. 246°", 20}, --- Artigo, Tempo
        {"Agressão - Art. 129°", 20}, --- Artigo, Tempo
        {"Sequestro - Art. 148°", 20}, --- Artigo, Tempo
        {"Tentativa de Homicídio - Art. 131°", 20}, --- Artigo, Tempo
        {"Homicídio Culposo - Art. 121°", 20}, --- Artigo, Tempo
        {"Cumplicidade - Art. 27°", 20}, --- Artigo, Tempo
        {"Desobediência - Art. 195°", 20}, --- Artigo, Tempo
        {"Corrupção - Art. 317°", 20}, --- Artigo, Tempo
        {"Vandalismo - Art. 163°", 20}, --- Artigo, Tempo
        {"Abuso de Autoridade - Art. 4°", 20}, --- Artigo, Tempo
        {"Apoligia ao Crime - Art. 287°", 20}, --- Artigo, Tempo
        {"Extorsão - Art. 158°", 20}, --- Artigo, Tempo
        {"Calunia - Art. 138°", 20}, --- Artigo, Tempo
        {"Foragido - Art. 410°", 20}, --- Artigo, Tempo
    }
}

Rapaziada, estou fazendo um sistema de apreensão que tem que selecionar o artigo e ira somando o tempo automaticamente, mas não sei como eu posso fazer isso de adicionar, pois sou novo nessa area, se alguem poder me ajudar

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