Jump to content

Panel


Arsilex

Recommended Posts

Posted

Por que no me funciona esto

local state = false 
--Interfraz 
function Panel ( ) 
    dxDrawRectangle(1229.0,1.0,137.0,766.0,tocolor(0,0,0,160),false) 
    dxDrawImage(1232.0,120.0,134.0,119.0,"Imagenes/Stats.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) 
    dxDrawImage(1232.0,401.0,134.0,119.0,"Imagenes/Stats.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) 
    dxDrawImage(1232.0,261.0,134.0,119.0,"Imagenes/Maps.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) 
end 
  
function Panel2 () 
    Player = guiCreateButton(1237,134,124,105,"",false) 
    guiSetAlpha(Player,0.5) 
    Mapas = guiCreateButton(1237,275,124,105,"",false) 
    guiSetAlpha(Mapas,1) 
    AntiLag = guiCreateButton(1237,408,124,105,"",false) 
    guiSetAlpha(AntiLag,1) 
    addEventHandler ( "onClientGuiClick", Player, Stats1, false ) 
end 
addEvent ( "onPanel2", true ) 
addEventHandler ( "onPanel2", root, Panel2 ) 
  
function Panelq2 () 
destroyElement (Player) 
destroyElement (Mapas) 
destroyElement (AntiLag) 
end 
addEvent ( "onPanelq2", true ) 
addEventHandler ( "onPanelq2", root, Panelq2 ) 
  
  
function Stats1() 
    addEventHandler ( "onClientRender", root, stats ) 
end 
  
  
bindKey ( "F7", "down", 
    function ( ) 
        state = ( not state ) 
        removeEventHandler ( "onClientRender", root, Panel ) 
        triggerEvent ( "onPanelq2", root) 
        showCursor ( false ) 
        if ( state ) then 
            addEventHandler ( "onClientRender", root, Panel ) 
            triggerEvent ( "onPanel2", root) 
            showCursor ( true ) 
        end 
    end 
) 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

que es lo que presisamente no funciona?.

deberias intentar haciendo el bind en serverside y aplicando los triggers

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

Para que puedas abir el panel, tienes que ponerle las funciones al boton para que se pueda abrir, si no le pones el nombre de la funcion al boton como piensas que se abrira.

Proximamente Proyecto SX!

In game Nick: [sX]DefearT~#

Skype: imarcosr

Twitter: @iMarcosR

Posted

MarcosR tu piensas antes de ablar que funciones???? Si esta todo

Enciende el panel

bindKey ( "F7", "down", 
    function ( ) 
        state = ( not state ) 
        removeEventHandler ( "onClientRender", root, Panel ) 
        triggerEvent ( "onPanelq2", root) 
        showCursor ( false ) 
        if ( state ) then 
            addEventHandler ( "onClientRender", root, Panel ) 
            triggerEvent ( "onPanel2", root) 
            showCursor ( true ) 
        end 
    end 
) 

    addEventHandler ( "onClientGuiClick", Player, Stats1, false ) 

Eso cuando presiono el boton Player tiene que encenderse Stats1 Osea esto

function Stats1() 
    addEventHandler ( "onClientRender", root, stats ) 
end 

Que activa lo que tengo en stats ....

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

Es: "onClientGUIClick", no "onClientGuiClick".

Pusiste con minusculas: "ui".

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

Mira tengo otra duda

tengo esto en serverside

function showHome() 
    local Home = exports.admin:getPlayerCountry(source) or "N/A" 
    setElementData(source,"Country",Home) 
end 
addEventHandler("onResourceStart", root, showHome) 
  

y esto en ClientSide

        Country = getElementData(source,"Country") 
        dxDrawColorText( tostring ( Country ),355.0,108.0,471.0,126.0,tocolor(255,255,255,255),1.0,"sans","left","top",false,false,true) 
  

pero me sale false :S

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

Eso es porque estas usando el evento: "onResourceStart" que no tiene ningun argumento de jugador.

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

Pero vas a tener que poner el pais tambien cuando inicia el recurso para todos los jugadores, porque si no tendran que reconectar.

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

A eso me refiero, pero tambien cuando el recurso inicia.

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