Jump to content

bug fixed pls/ show/hide is not


Recommended Posts

Posted
addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
  
        guiwindow = dxCreateWindow(0.6837,0,0.315,0.9983,"*SGF| Sidebar",true) 
        guistats = dxCreateButton(44,24,164,66,"Stats",false,guiwindow) 
        dxSetFont(guistats,"sans") 
dxSetProperty(guistats,"Font","sans")         
        guishop = dxCreateButton(44,125,164,66,"Shop",false,guiwindow) 
        dxSetFont(guishop,"sans") 
dxSetProperty(guishop,"Font","sans") 
        guimap = dxCreateButton(44,225,164,68,"Map Shop",false,guiwindow) 
        dxSetFont(guimap,"sans") 
dxSetProperty(guimap,"Font","sans") 
        guiachie = dxCreateButton(44,320,164,65,"Achievement",false,guiwindow) 
        dxSetFont(guiachie,"sans") 
dxSetProperty(guiachie,"Font","sans") 
        guileader = dxCreateButton(43,417,166,65,"Leader Board",false,guiwindow) 
        dxSetFont(guileader,"sans") 
dxSetProperty(guileader,"Font","sans") 
        guioption = dxCreateButton(43,527,166,63,"Options",false,guiwindow) 
        dxSetFont(guioption,"sans") 
dxSetProperty(guioption,"Font","sans") 
        end 
) 
  
function guiac () 
    dxSetVisible(guiwindow, false) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), guiac) 
  
function guiac () 
    local IsWindowVisible = dxGetVisible(guiwindow) 
    if (IsWindowVisible == true) then 
        dxSetVisible(guiwindow, false) 
        dxSetInputEnabled(false) 
        showCursor(false) 
    end 
    if (IsWindowVisible == false) then 
        dxSetVisible(guiwindow, true) 
        dxSetInputEnabled(true) 
        showCursor(true) 
    end 
end 
  
bindKey("F7", "down", guiac) 

Posted

dxGetVisible

dxSetVisible

are not MTA built-in functions.

€: Your code is a complete mess. All your dxFunctions are not built-in. Show us the functions.

Posted

Your code is totally wrong.

You should download vEnom dx functions and put them in your script, then you can use them.

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