Jump to content

Panel not showing up


hackermagus

Recommended Posts

Hy all'

I made this script

bindKey ( "r", "down", dxWindow )
  function dxWindow()
      dxDrawRectangle(406.0,277.0,650.0,235.0,tocolor(0,0,0,175),false)
      dxDrawLine(447.0,318.0,1005.0,318.0,tocolor(255,255,255,255),1.0,false)
          dxDrawText("Rádió",456.0,285.0,642.0,319.0,tocolor(0,0,0,255),1.0,"pricedown","left","top",false,false,false)
      dxDrawText("Rádió",451.0,289.0,637.0,323.0,tocolor(255,255,0,170),1.0,"pricedown","left","top",false,false,false)
      dxDrawText("Parancsok:",453.0,335.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("/vs - Visszaszámláló indítása",478.0,350.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("/enableauto - Autómatikus bejelentkezés engedélyezése (amennyiben van már regisztrált fiókod)",478.0,365.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("/disableauto - Autómatikus bejelentkezés letiltása (amennyiben van már regisztrált fiókod)",478.0,380.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("Gombok:",453.0,395.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F1 - Freeroam menü",478.0,410.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F2 - Teleportok",478.0,425.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F5 - Telefon",478.0,440.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F6 - Segítség",478.0,455.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F11 - Térkép",478.0,470.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("K - Tempomat",478.0,485.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("Az F6 - tal zarhatod be",650.0,655.0,200.0,200.0,"pricedown","left","top",false,false,false)
  end

And it's not working..

I turn on the debugscript 3 and it says "Bad argument @ 'bindKey' [Expected function at argument 3 got nil]"

How can I solve that?

Link to comment
23 minutes ago, hackermagus said:

Hy all'

I made this script


bindKey ( "r", "down", dxWindow )
  function dxWindow()
      dxDrawRectangle(406.0,277.0,650.0,235.0,tocolor(0,0,0,175),false)
      dxDrawLine(447.0,318.0,1005.0,318.0,tocolor(255,255,255,255),1.0,false)
          dxDrawText("Rádió",456.0,285.0,642.0,319.0,tocolor(0,0,0,255),1.0,"pricedown","left","top",false,false,false)
      dxDrawText("Rádió",451.0,289.0,637.0,323.0,tocolor(255,255,0,170),1.0,"pricedown","left","top",false,false,false)
      dxDrawText("Parancsok:",453.0,335.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("/vs - Visszaszámláló indítása",478.0,350.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("/enableauto - Autómatikus bejelentkezés engedélyezése (amennyiben van már regisztrált fiókod)",478.0,365.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("/disableauto - Autómatikus bejelentkezés letiltása (amennyiben van már regisztrált fiókod)",478.0,380.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("Gombok:",453.0,395.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F1 - Freeroam menü",478.0,410.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F2 - Teleportok",478.0,425.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F5 - Telefon",478.0,440.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F6 - Segítség",478.0,455.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("F11 - Térkép",478.0,470.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("K - Tempomat",478.0,485.0,637.0,323.0,tocolor(255,255,255,170),1.0,"default-bold","left","top",false,false,false)
      dxDrawText("Az F6 - tal zarhatod be",650.0,655.0,200.0,200.0,"pricedown","left","top",false,false,false)
  end

And it's not working..

I turn on the debugscript 3 and it says "Bad argument @ 'bindKey' [Expected function at argument 3 got nil]"

How can I solve that?

because u put bindKey over a function this means that argument 3 is not defined

u need to put it under function or do it like that
 

bindKey("r","down",

function ()

end

end)

 

Edited by xFabel
Link to comment
13 minutes ago, xFabel said:

because u put bindKey over a function this means that argument 3 is not defined

u need to put it under function or do it like that
 


bindKey("r","down",

function ()

end

end)

 

It's worked thank you!

And how can I do when the panel not showed up and I press "r" it showing up and when it's showed up and I press "r" it not showing up

Edited by hackermagus
Link to comment
Just now, hackermagus said:

It's worked thank you!

And how can I do when the panel not showing up and I press "r" it showing up and when it's showed up and I press "r" it not showing up

so easy just make other function

here we go

function openandclose()
if removeEventHandler("onClientRender", root, yournamefunctiondx) then
    removEventHandler("onClientRender", root, yournamefunctiondx)
    else
    addEventHandler("onClientRender", root, yournamefunctiondx)
    end
  end
bindKey("r","down",openandclose)

just change the name argument 3 in

removeEventHandler
addEventHandler

good luck :)

 

Link to comment
3 minutes ago, xFabel said:

so easy just make other function

here we go


function openandclose()if removeEventHandler("onClientRender", root, yournamefunctiondx) then    removEventHandler("onClientRender", root, yournamefunctiondx)    else    addEventHandler("onClientRender", root, yournamefunctiondx)    end  endbindKey("r","down",openandclose)

just change the name argument 3 in


removeEventHandleraddEventHandler

good luck :)

 

It worked too!!

Thank you

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