Jump to content

[Ajuda]Painel DX


Recommended Posts

Eae galera eu criei um simples painel em Dx so pra mostrar os beneficios vip mas eu nao sei colocar a funçao para abrir e fechar queria que abrisse com uma tecla do teclado aqui esta o codigo

  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
    ) 
  

Link to comment

tente isso

 function Render () 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
  
  
function screen() 
    if isVisible then 
        addEventHandler("onClientRender", root, Render) 
    else 
        removeEventHandler("onClientRender", root, Render) 
    end 
    isVisible = not isVisible 
end 
bindKey ("f2", "down", screen) -- botão 

Edited by Guest
Link to comment
tente isso
 function Render () 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
addEventHandler("onClientRender", root, Render ) 
 Funfo nao nem trocando as linhas 
function screen() 
    if isVisible then 
        addEventHandler("onClientRender", root, Render) 
    else 
        removeEventHandler("onClientRender", root, Render) 
    end 
    isVisible = not isVisible 
end 
bindKey ("f2", "down", screen) -- botão 

Link to comment

Teste esse!!

function Render() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
  
  
  
bindKey ( "f2", "both", 
    function ( key, keyState ) 
        if ( keyState == "down" ) then 
                addEventHandler("onClientRender", getRootElement(), Render) 
        elseif ( keyState == "up" ) then 
        removeEventHandler("onClientRender", getRootElement(), Render)           
        end 
    end 
) 

Link to comment
Teste esse!!
function Render() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
  
  
  
bindKey ( "f2", "both", 
    function ( key, keyState ) 
        if ( keyState == "down" ) then 
                addEventHandler("onClientRender", getRootElement(), Render) 
        elseif ( keyState == "up" ) then 
        removeEventHandler("onClientRender", getRootElement(), Render)           
        end 
    end 
) 

Nao deu devolta :|

Link to comment

todos os 2 exemplos abaixo foi testado

exemplo 1 ( apertar 1 ou 2 vezes ele vai aparacer )

function Render() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
  
  
  
bindKey ("F2", "down", 
function () 
    if isVisible then 
        addEventHandler("onClientRender", getRootElement(), Render) 
    else 
        removeEventHandler("onClientRender", getRootElement(), Render) 
    end 
    isVisible = not isVisible 
end 
) 

exemplo 2 ( manter ele pressionado ele vai aparecer )

function Render() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
  
  
  
bindKey ( "f2", "both", 
    function ( key, keyState ) 
        if ( keyState == "down" ) then 
                addEventHandler("onClientRender", getRootElement(), Render) 
        elseif ( keyState == "up" ) then 
        removeEventHandler("onClientRender", getRootElement(), Render)          
        end 
    end 
) 

Link to comment
todos os 2 exemplos abaixo foi testado

exemplo 1 ( apertar 1 ou 2 vezes ele vai aparacer )

function Render() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
  
  
  
bindKey ("F2", "down", 
function () 
    if isVisible then 
        addEventHandler("onClientRender", getRootElement(), Render) 
    else 
        removeEventHandler("onClientRender", getRootElement(), Render) 
    end 
    isVisible = not isVisible 
end 
) 

exemplo 2 ( manter ele pressionado ele vai aparecer )

function Render() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
    end 
  
  
  
bindKey ( "f2", "both", 
    function ( key, keyState ) 
        if ( keyState == "down" ) then 
                addEventHandler("onClientRender", getRootElement(), Render) 
        elseif ( keyState == "up" ) then 
        removeEventHandler("onClientRender", getRootElement(), Render)          
        end 
    end 
) 

Aqui nos dois so aparece o cursor mas o painel nao :/

Link to comment
Veja o que mostra no debug mode, digite /debugscript 3.

Se não tiver erros lá, realmente deve ser outro problema já que o código que o #RooTs testou funciona.

Aparece um erro quando aperta F2 aparece alguma coisa com Cursor Lua 20 eu axo depois eu edito aqui e mando e img

Link to comment

Teste isso

painel = false 
function PainelDX() 
        dxDrawText("     Beneficios V.I.P\nFunçoes Player\n#1 : JetPack\n#2 : Invisivel\n#3 : Velocidade 3x\n#4 : Kit Armas V.I.P\n#5 : Sniper One Hit Kill\n#6 : Vida | Colete\n#7 : Skin V.I.P\n#8 : Todas as Habilidades\nFunçoes Carro\n#1 : Indestrutivel\n#2 : Invisivel", 420, 308, 817, 512, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawLine(410 - 1, 296 - 1, 410 - 1, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 296 - 1, 410 - 1, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(410 - 1, 512, 598, 512, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(598, 512, 598, 296 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(410, 296, 188, 216, tocolor(116, 101, 18, 70), false) 
end 
  
function abrir() 
if painel == false then 
painel = true 
addEventHandler("onClientRender", root, PainelDX) 
else 
painel = false 
removeEventHandler("onClientRender", root, PainelDX) 
end 
end 
bindKey ("f2", "down", abrir) 

Link to comment
  • 1 month later...

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