Jump to content

Que falla


Arsilex

Recommended Posts

function Panel ( ) 
    dxDrawRectangle(1238.0,0.0,128.0,767.0,tocolor(0,0,0,200),true) 
    boton1 = dxDrawImage(1240.0,163.0,126.0,96.0,"Imagenes/Stats.png",0.0,0.0,0.0,tocolor(255,255,255,255),true) 
    boton2 = dxDrawImage(1239.0,1.0,126.0,102.0,"Imagenes/Maps.png",0.0,0.0,0.0,tocolor(255,255,255,255),true) 
    addEventHandler ( "onClientClick", boton2, Mapas1, false ) 
end 
  
function Mapas1() 
    state = ( not state ) 
    removeEventHandler ( "onClientRender", root, maps ) 
    if ( state ) then 
        addEventHandler ( "onClientRender", root, maps ) 
    end 
end  

Link to comment

Tu function es: "Panel", no "maps", ademas,

addEventHandler ( "onClientClick", boton2, Mapas1, false ) 

Tiene que ir fuera de la funcion: "Panel".

function Panel ( ) 
    dxDrawRectangle(1238.0,0.0,128.0,767.0,tocolor(0,0,0,200),true) 
    boton1 = dxDrawImage(1240.0,163.0,126.0,96.0,"Imagenes/Stats.png",0.0,0.0,0.0,tocolor(255,255,255,255),true) 
    boton2 = dxDrawImage(1239.0,1.0,126.0,102.0,"Imagenes/Maps.png",0.0,0.0,0.0,tocolor(255,255,255,255),true) 
end 
  
function Mapas1 ( ) 
    state = ( not state ) 
    removeEventHandler ( "onClientRender", root, Panel ) 
    if ( state ) then 
        addEventHandler ( "onClientRender", root, Panel ) 
    end 
end 
addEventHandler ( "onClientClick", boton2, Mapas1, false ) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...