Jump to content

Que falla


Arsilex

Recommended Posts

Posted
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  

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No existen eventos para hacer eso, lo unico que podes es comparar la posicion del cursor con la de la imagen.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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