Jump to content

ikvindmooi

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by ikvindmooi

  1. Hello,

    I do have a question about calling an exports. 

    I have an export to add profiles to an xml file the export is:

    exports.XML:addProfileToXML(id, username);

    Now I want to use this export event in an javascript function, but it is not triggering the function. It does work if I try to export it clientside but it doesn't in js.

    I tried using it with or without the "exports.XML:" but it doesnt work

    mta.triggerEvent("exports.XML:addProfileToXML", id, username);
    mta.triggerEvent("addProfileToXML", id, username);

     

  2. I do have one more question. I do have the panel working, but this looks kinda ugly when it's changing directly. I want it like going smooth. I guess I have to use timers for that but I don't know how to imply that in the script. Like it adds +5 for 3/4 seconds then stop every time I click the button. Anyone can help me?

    EDIT:

    I fixed the part that it's going more smooth but now it doesn't stop. it keeps rotating.

    function onPanelRegisterButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        setTimer ( function lol() 
        rot1 = (rot1 + 5)%360 
        end, 300, 0.001 )    
    end 
    addEventHandler("onClientGUIClick", lu, onPanelRegisterButtonClicked, false) 
    

    EDIT2: NVM I fixed it myself with setTimer and killTimer ;)

  3. Yes that would be better, but it's not a loading thing, I'm just trying to make like a game where you need to find the right path. like when you click on it it turns a bit

    something like this:

    lost-lagoon-the-trail-of-destiny029.jpg

    but instead of the pieces sliding it will turn and you need to find the right way.

    EDIT:

    Offtopic: Is it possible to add different scale's in dxDrawText? Like at the text part the first letters will be bigger then the rest, or i need to make two different texts

  4. I was looking for the second methode, thanks it worked, but this one is only with 2 options i want 3/4 options like it's go in a circle, i guess you can't do that with this because there's just 2 options, true and false.

    I got this so far,

    local shouldRotate = false 
    function drawpanel() 
        if(shouldRotate == false) then 
            dxDrawImage(689, 280, 400, 400, "circle.png", 21) 
        elseif(shouldRotate == true) then 
            dxDrawImage(689, 280, 400, 400, "circle.png", 90) 
        end 
    end 
      
    function drawcircle() 
        if (shouldRotate == false) then 
        shouldRotate = true 
        else 
        shouldRotate = false 
        end 
    end 
    bindKey ( "Z", "down", drawcircle) 
      
    

  5. Hello guys,

    I'm trying to make a panel where you can rotate a circle image when you click space key

    so I have this image

    dxDrawImage(689, 280, 116, 115, "circlebar.png", 21) 
    

    I want like when you click on 'space' the image will rotate like 90 degrees.

    I tried some ways by my own with rot = 21+90 and stuff but it didn't work. I don't know how to attach the bindkey with the rotation anyone can help me out?

    Thanks.

  6. Hello,

    I am trying to make an login panel with DX, so i wanted to put an DX editbox, but the editbox is behind the DX panel instead of at the front of it. how can I get the editbox to the front of the panel?

    I've looked around at wiki etc, I found something like postGUI which was for that i guess. I changed that to true but it didn't work

    editbox syntax

    createEditBox( string/int id, float( 0 - 1 ) x, float( 0 - 1 ) y, float( 0 - 1 ) width, float( 0 - 1 ) height, bool visible, string text, bool mask, int maxLength, string font text, bool space, int type, function color( r, g, b, a ),  bool rectangle,  function rectangleColor ( r, g, b, a ), float scaleText, bool clip,  int ms ( how many miliseconds have to pass to delete text with backspace), bool helpText , string helpText, function helpTextColor( r, g, b, a ), bool helpTextOff, float helpTextScale, string helpTextFont, bool postGUI, bool carret, function carretColor( r, g, b ), bool specialCharacters, bool clickable ) 
    

    nvm fixed it. it was the dxDrawRectangle at the other function its postGUI was true

  7. Hello,

    I do have a question about a panel I've made in DX. I want this panel to show at the center of the screen at every resolution but i can not manage to get it. Now it does show up and it works, but it's not at the same place at the middle. at lowest resolution its in the middle, but with higher resolutions it is opening at the left side of the screen.

    I did tried to make a new local guiGetScreenSize and add it to the DX GUI then the GUI does work but the color does not change when i get to the login text.

    EDIT: There's no error in debug.

    Thanks,

    Held

    firstFont = dxCreateFont( "xirod.ttf", 20) 
    ----------------------------------- 
    function isMouseInPosition ( x, y, width, height ) 
        if ( not isCursorShowing ( ) ) then 
            return false 
        end 
      
        local sx, sy = guiGetScreenSize ( ) 
        local cx, cy = getCursorPosition ( ) 
        local cx, cy = ( cx * sx ), ( cy * sy ) 
        if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then 
            return true 
        else 
            return false 
        end 
    end 
      
      
        function drawPanel() 
            dxDrawRectangle(245, 193, 517, 270, tocolor(0, 0, 0, 185), true) 
            dxDrawRectangle(245, 150, 520, 38, tocolor(0, 0, 0, 185), true) 
            --------------- 
            if ( isMouseInPosition(80, 330, 160, 30) ) then 
            dxDrawText("Login", -150, 314, 473, 381, tocolor(0, 255, 255, 255), 0.9, secondFont, "center", "center", false, false, true, false, false) 
            else 
            dxDrawText("Login", -150, 314, 473, 381, tocolor(255, 255, 255, 255), 0.9, secondFont, "center", "center", false, false, true, false, false) 
            end 
      
        end 
    

  8. I've got another question. I got a panel, and some buttons. These are supposed to open a panel when you click at one it also works. But, I want it for example if you click on LS button the ls panel appear, but if you click on LV button, LS panel will disappear and the LV one will appear.

    Script i've so far. This opens the panel but when you click on the other one that one opens as well, but i want the previous one closed if you click on another one.

    local drawingPanel = false 
      
    function drawPanel() 
        dxDrawImage(306, 186, 399, 344, "wdspawn.png", 0, 0, 0, tocolor(0, 0, 0, 160), false) 
        dxDrawText("RC", 552, 397, 615, 439, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, true, false, false) 
        dxDrawText("WS", 395, 396, 458, 438, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, true, false, false) 
        dxDrawText("LS", 478, 460, 541, 502, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, true, false, false) 
        dxDrawText("Spawn", 405, 334, 605, 378, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false) 
        
       if detailFunction and type(detailFunction) == "function" then 
            detailFunction() -- draw the right part the panel 
        end 
    end 
      
    local function attachHandler() 
        if not drawing then 
            addEventHandler("onClientRender", root, drawPanel) 
            drawing = true 
            guiPanelBtnSetVisible ( true ) 
            showCursor ( true ) 
        end 
    end 
      
    local function removeHandler() 
        if drawing then 
            removeEventHandler("onClientRender", root, drawPanel) 
            guiPanelBtnSetVisible ( false ) 
            showCursor ( false )   
        end 
    end 
      
    addEventHandler("onClientPlayerWasted", localPlayer, attachHandler) 
      
    addEvent("onClientPlayerLogin", true) 
    addEventHandler("onClientPlayerLogin", localPlayer, attachHandler) 
      
    addEventHandler("onClientPlayerSpawn", localPlayer, removeHandler) 
      
    function guiPanelBtnSetVisible( bool ) 
        guiSetVisible(ls.btn, bool) 
        guiSetVisible(ws.btn, bool) 
        guiSetVisible(rc.btn, bool) 
    end 
      
    ------------------------------------------------------------------------------------------------------- 
    ls = {} 
    function drawLSwindow( btn, state) 
        ls.window = guiCreateWindow(552, 481, 355, 198, "", false) 
        lsCatagory = guiCreateGridList(17, 45, 155, 143, false, ls.window) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Catagory", 0.9) 
        lsCatagory = guiCreateGridList(182, 45, 155, 143, false, ls.window) 
        guiGridListAddColumn(class.gridlist, "Class", 0.9) 
        lsLabal = guiCreateLabel(21, 21, 107, 24, "Los Santos Spawns", false, ls.window) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
    end 
         
    function onLSButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        detailFunction = drawLSwindow 
    end 
      
    ls.btn = guiCreateButton(476, 452, 66, 60, "", false) 
    guiSetAlpha(ls.btn, 0) 
    guiSetVisible(ls.btn, false) 
    addEventHandler("onClientGUIClick", ls.btn, onLSButtonClicked, true) 
    ------------------------------------------------------------------------------------------------------- 
    ws = {} 
    function drawWSwindow( btn, state) 
        ws.window = guiCreateWindow(32, 422, 355, 198, "", false) 
        wsCatagory = guiCreateGridList(17, 45, 155, 143, false, ws.window) 
        guiGridListAddColumn(GUIEditor.gridlist[2], "Catagory", 0.9) 
        wsClass = guiCreateGridList(182, 45, 155, 143, false, ws.window) 
        guiGridListAddColumn(GUIEditor.gridlist[3], "Class", 0.9) 
        wsLabel = guiCreateLabel(21, 21, 133, 24, "Whetstone Spawns", false, ws.window) 
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center") 
    end 
      
    function onWSButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        detailFunction = drawWSwindow 
    end 
      
    ws.btn = guiCreateButton(397, 388, 66, 60, "", false) 
    guiSetAlpha(ws.btn, 0) 
    guiSetVisible(ws.btn, false) 
    addEventHandler("onClientGUIClick", ws.btn, onWSButtonClicked, true) 
    ------------------------------------------------------------------------------------------------------- 
    rc = {} 
    function drawRCwindow( btn, state) 
        rc.window = guiCreateWindow(627, 422, 355, 198, "", false) 
        rcCatagory = guiCreateGridList(17, 45, 155, 143, false, rc.window) 
        guiGridListAddColumn(GUIEditor.gridlist[4], "Catagory", 0.9) 
        rcClass = guiCreateGridList(182, 45, 155, 143, false, rc.window) 
        guiGridListAddColumn(GUIEditor.gridlist[5], "Class", 0.9) 
        rcLabel = guiCreateLabel(21, 21, 123, 24, "Red Country Spawns", false, rc.window) 
        guiLabelSetVerticalAlign(GUIEditor.label[3], "center") 
    end 
      
    function onRCButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        detailFunction = drawRCwindow 
    end 
      
    rc.btn = guiCreateButton(551, 387, 66, 60, "", false) 
    guiSetAlpha(rc.btn, 0) 
    guiSetVisible(rc.btn, false) 
    addEventHandler("onClientGUIClick", rc.btn, onRCButtonClicked, false) 
    

  9. Well, to start with, the events you are using are both server side.

    Second, you put a parentheses where there should be a comma.

    addEventHandler( "onPlayerWasted", root ) 
    

    Correct:

    addEventHandler( "onPlayerWasted", root, 
    

    Ah, I've also tried to do it without a parenthese as explained in wiki but that didn't work.

    So probably the problem is that I've use it in clientside

    I'll try it in serverside.

    Thanks,

    EDIT::

    I've got another problem..

    debug:

    lua:4: attempt to call global 'drawPanel' (a nill value)

    I've moved the eventhandlers to the clientside.

    When I die that error comes and when I login as well.

    The codes so far.

    ServerSide:

    addEventHandler ( "onPlayerLogin", root, 
        function () 
            if not drawingPanel then 
                drawPanel() 
                drawingPanel = true 
            else 
                drawPanel() 
                drawingPanel = false 
            end 
        end 
    ) 
      
      
    addEventHandler( "onPlayerWasted", root, 
        function () 
            if not drawingPanel then 
                drawPanel() 
                drawingPanel = true 
            else 
                drawPanel() 
                drawingPanel = false 
            end 
        end 
    ) 
    

    ClientSide:

    function drawPanel() 
        dxDrawImage(306, 186, 399, 344, "wdspawn.png", 0, 0, 0, tocolor(0, 0, 0, 160), false) 
        dxDrawText("Spawn", 405, 334, 605, 378, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false) 
    end 
    

    I've read that I need to use SetTimer, but I don't know how I can apply it to the script.

  10. hello guys,

    I'm creating a panel which should appear when you died or when you log in the server. But what I've tried didnt work. Someone can tell me how it should be?

    There are 2 warnings with debug

    lua:8 Bad argument @ 'addEventHandler' [Expected function at argument 3, got none]

    lua:20 Bad argument @ 'addEventHandler' [Expected function at argument 3, got none]

    function drawPanel() 
        dxDrawImage(306, 186, 399, 344, "wdspawn.png", 0, 0, 0, tocolor(0, 0, 0, 160), false) 
        dxDrawText("Spawn", 405, 334, 605, 378, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "center", "top", false, false, true, false, false) 
    end 
      
    local drawingPanel = false 
    addEventHandler ( "onPlayerLogin", root ) 
        function () 
            if not drawingPanel then 
                drawPanel() 
                drawingPanel = true 
            else 
                drawPanel() 
                drawingPanel = false 
            end 
        end 
      
      
    addEventHandler( "onPlayerWasted", root ) 
        function () 
            if not drawingPanel then 
                drawPanel() 
                drawingPanel = true 
            else 
                drawPanel() 
                drawingPanel = false 
            end 
        end 
    

  11. Try this:

    jobPanel = guiCreateWindow (344, 146, 342, 458, "Pizza Job", false) 
    guiWindowSetSizable (jobPanel, false) 
    jobMemo = guiCreateMemo (16, 30, 312, 384, "Here is the basic Info about Pizza! ->\n\nCurrent Job Head -> Mann\n\n------------ Finding The Job ------------\n\n - To find the pizza job see the Pizza Icon on the     .    map(F11).  \n\n------------ Doing The Job -------------\n\n - You will get a  and must deliver the pizza at     the Green Marker on the Map(F11). \n\n - On Delivery you will get your salary! \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" /> \n\n------------ Others ------------\n\n - For more Information you can contanct our staff       online!\n\n - You can also contanct the Job Head!", false, jobPanel) 
    guiMemoSetReadOnly (jobMemo, true) 
    jobButton = guiCreateButton (211, 423, 117, 20, "Close", false, jobPanel)   
    guiSetVisible (jobPanel, false) 
      
    function closePanel (button, state) 
        if button == "left" and state == "up" then 
        guiSetVisible( jobPanel, false ) 
        showCursor ( false ) 
        end 
    end 
    addEventHandler ( "onClientGUIClick", jobButton, closePanel, false ) 
      
    function openPanel() 
        if ( guiGetVisible ( jobPanel ) == true ) then 
            guiSetVisible ( jobPanel, false ) 
            showCursor ( false )     
        else 
            guiSetVisible (jobPanel, true ) 
            showCursor ( true ) 
        end 
    end 
    addCommandHandler("panel", openPanel, false, false ) 
    

  12. Hello guys,

    I got a problem because I'm trying to create a button which will allow you to hide your tag and show it.

    But it doesn't work, there's also no debug or error.

    Can someone maybe help me?

    PS: To check if it's even working I've added a outputchatbox, and the only thing it was saying is 'Tags Showing' but not Tag's hiding.

    function onPanelHideTagButtonClicked ( btn, state) 
        if btn ~= "left" or state ~= "up" then return end 
        if setPlayerNametagShowing ( player, true) then 
            setPlayerNametagShowing ( player, false) 
            outputChatBox('Tags Hiding') 
        else 
            setPlayerNametagShowing ( player, true) 
            outputChatBox('Tags Showing') 
        end 
    end 
      
    panel.btn.hidetag = guiCreateButton(643, 358, 745, 386, "", false) 
    guiSetAlpha(panel.btn.hidetag, 0) 
    guiSetVisible(panel.btn.hidetag, false) 
    addEventHandler("onClientGUIClick", panel.btn.hidetag, onPanelHideTagButtonClicked, false) 
    

    I also got a question 2:

    I want also a button to hide my blip and show it again. I've searched around but couldnt find it,

    Can someone who can explain me or show me?

    Thanks in advance,

    Held.

  13. God damn does this look even a LITTLE bit like that one, dude get some glasses please.

    If this is the same like that one seriously you got no brain then.

    Sorry for my behaviour

    Mine:

    2rpfozt.png

    Your:

    jkvg91.jpg

    EDIT:

    Im not gonna even use any "ON" and "OFF" command. So it's completely different lol.

  14. Try this (fill the function at the top to draw the right part of your panel:
    function drawHomeDetails() 
        -- draw 
        dxDrawText("This is the home detail content.", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) 
    end 
      
    function drawPlayerDetails() 
        -- draw 
        dxDrawText("This is the player detail content.", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) 
    end 
      
    function drawWeaponDetails() 
        -- draw 
        dxDrawText("This is the weapon detail content.", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) 
    end 
      
    function drawVehicleDetails() 
        -- draw 
        dxDrawText("This is the vehicle detail content.", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) 
    end 
      
    function drawBindsDetails() 
        -- draw 
        dxDrawText("This is the binds detail content.", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) 
    end 
      
    local panel = { 
        btn = {}, 
        detailFunction = drawHomeDetails 
    } 
      
    function drawPanel() 
        dxDrawRectangle(491, 297, 497, 263, tocolor(23, 23, 23, 255), true) 
        dxDrawRectangle(481, 279, 517, 28, tocolor(55, 55, 55, 255), true) 
        dxDrawText("Player", 487, 350, 622, 383, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
        dxDrawText("Weapon", 487, 383, 622, 416, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
        dxDrawText("Vehicle", 487, 416, 622, 449, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
        dxDrawText("Home", 487, 317, 622, 350, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
        dxDrawText("X", 968, 279, 998, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) 
        dxDrawText("X", 481, 279, 511, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) 
        dxDrawText("Binds", 487, 482, 622, 515, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
         
        if detailFunction and type(detailFunction) == "function" then 
            detailFunction() -- draw the right part the panel 
        end 
    end 
      
    function onPanelHomeButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        -- do some extra stuff if needed 
        detailFunction = drawHomeDetails 
    end 
      
    function onPanelPlayerButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        -- do some extra stuff if needed 
        detailFunction = drawPlayerDetails 
    end 
      
    function onPanelWeaponButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        -- do some extra stuff if needed 
        detailFunction = drawWeaponDetails 
    end 
      
    function onPanelVehicleButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        -- do some extra stuff if needed 
        detailFunction = drawVehicleDetails 
    end 
      
    function onPanelBindsButtonClicked( btn, state ) 
        if btn ~= "left" or state ~= "up" then return end 
        -- do some extra stuff if needed 
        detailFunction = drawBindsDetails 
    end 
      
    panel.btn.home = guiCreateButton(487, 317, 135, 33, "", false) 
    guiSetAlpha(panel.btn.home, 0) 
    guiSetVisible(panel.btn.home, false) 
    addEventHandler("onClientGUIClick", panel.btn.home, onPanelHomeButtonClicked, false) 
    panel.btn.vehicle = guiCreateButton(487, 416, 135, 33, "", false) 
    guiSetAlpha(panel.btn.vehicle, 0) 
    guiSetVisible(panel.btn.vehicle, false) 
    addEventHandler("onClientGUIClick", panel.btn.vehicle, onPanelVehicleButtonClicked, false) 
    panel.btn.weapon = guiCreateButton(487, 383, 135, 33, "", false) 
    guiSetAlpha(panel.btn.weapon, 0) 
    guiSetVisible(panel.btn.weapon, false) 
    addEventHandler("onClientGUIClick", panel.btn.weapon, onPanelWeaponButtonClicked, false) 
    panel.btn.player = guiCreateButton(487, 350, 135, 33, "", false) 
    guiSetAlpha(panel.btn.player, 0) 
    guiSetVisible(panel.btn.player, false) 
    addEventHandler("onClientGUIClick", panel.btn.player, onPanelPlayerButtonClicked, false) 
    panel.btn.binds = guiCreateButton(487, 482, 135, 33, "", false) 
    guiSetAlpha(panel.btn.binds, 0) 
    guiSetVisible(panel.btn.binds, false) 
    addEventHandler("onClientGUIClick", panel.btn.binds, onPanelBindsButtonClicked, false) 
      
    local drawingPanel = false 
    function togglePanel() 
        if not drawingPanel then 
            showPanel() 
            drawingPanel = true 
        else 
            hidePanel() 
            drawingPanel = false 
        end 
    end 
    addCommandHandler("panel", togglePanel, false, false) 
      
    function guiPanelBtnSetVisible( bool ) 
        guiSetVisible(panel.btn.home, bool) 
        guiSetVisible(panel.btn.player, bool) 
        guiSetVisible(panel.btn.weapon, bool) 
        guiSetVisible(panel.btn.vehicle, bool) 
        guiSetVisible(panel.btn.binds, bool) 
    end 
      
    function showPanel() 
        addEventHandler("onClientPreRender", root, drawPanel) 
        showCursor(true) 
        guiPanelBtnSetVisible(true) 
    end 
      
    function hidePanel() 
        removeEventHandler("onClientPreRender", root, drawPanel) 
        showCursor(false) 
        guiPanelBtnSetVisible(false) 
    end 
    

    Thanks it worked,

    And how do I set that the homescreen opens directly when you type /panel and not a blank screen?

  15. I want text as tabs, can someone help me how I can do this the best?

    for example

    This is what should happen when you click on Home

    2rpfozt.png

    And this when you click on Player

    1z4jo1h.png

  16. local drawingPanel = false; 
      
    function startDrawing_CMD() 
        if(drawingPanel == false) then 
            addEventHandler("onClientPreRender", getRootElement(), draw); 
            drawingPanel = true; 
        else 
            removeEventHandler("onClientPreRender", getRootElement(), draw); 
            drawingPanel = false; 
        end 
    end 
    addCommandHandler("Panel", startDrawing_CMD, false, false); 
    

    thanks mate it worked;)

  17. Thanks, it opens now but I want it to open when I type /panel how do i fix that

    What I've changed

    function draw() 
    basis = dxDrawRectangle(491, 297, 497, 263, tocolor(23, 23, 23, 255), true) 
    dxDrawRectangle(481, 279, 517, 28, tocolor(55, 55, 55, 255), true) 
    dxDrawText("Player", 487, 350, 622, 383, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("Weapon", 487, 383, 622, 416, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("Vehicle", 487, 416, 622, 449, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("Home", 487, 317, 622, 350, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("X", 968, 279, 998, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) 
    dxDrawText("X", 481, 279, 511, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) 
    dxDrawText("Hello,", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) 
    dxDrawText("Binds", 487, 482, 622, 515, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    home = guiCreateButton(487, 317, 135, 33, "", false) 
    guiSetAlpha(home, 0.00) 
    vehicle = guiCreateButton(487, 416, 135, 33, "", false) 
    guiSetAlpha(vehicle, 0.00) 
    weapon = guiCreateButton(487, 383, 135, 33, "", false) 
    guiSetAlpha(weapon, 0.00) 
    player = guiCreateButton(487, 350, 135, 33, "", false) 
    guiSetAlpha(player, 0.00) 
    binds = guiCreateButton(487, 482, 135, 33, "", false) 
    guiSetAlpha(binds, 0.00) 
    guiSetVisible ( basis, false ) 
    showcursor (true) 
    end 
    addEventHandler("onClientRender",root,draw) 
      
    

  18. Hello guys,

    I got a problem i made a panel with dx but I can't make it open with the command /panel. Theres also no errors at debug.

    Heres the code.

    basis = dxDrawRectangle(491, 297, 497, 263, tocolor(23, 23, 23, 255), true) 
    dxDrawRectangle(481, 279, 517, 28, tocolor(55, 55, 55, 255), true) 
    dxDrawText("Player", 487, 350, 622, 383, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("Weapon", 487, 383, 622, 416, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("Vehicle", 487, 416, 622, 449, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("Home", 487, 317, 622, 350, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    dxDrawText("X", 968, 279, 998, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) 
    dxDrawText("X", 481, 279, 511, 305, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false) 
    dxDrawText("Hello,", 660, 317, 887, 405, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) 
    dxDrawText("Binds", 487, 482, 622, 515, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) 
    home = guiCreateButton(487, 317, 135, 33, "", false) 
    guiSetAlpha(home, 0.00) 
    vehicle = guiCreateButton(487, 416, 135, 33, "", false) 
    guiSetAlpha(vehicle, 0.00) 
    weapon = guiCreateButton(487, 383, 135, 33, "", false) 
    guiSetAlpha(weapon, 0.00) 
    player = guiCreateButton(487, 350, 135, 33, "", false) 
    guiSetAlpha(player, 0.00) 
    binds = guiCreateButton(487, 482, 135, 33, "", false) 
    guiSetAlpha(binds, 0.00) 
    guiSetVisible ( basis, false ) 
      
      
    function open() 
        if ( guiGetVisible ( basis ) == true ) then 
            guiSetVisible ( basis, false ) 
            showCursor(false) 
        else then 
            guiSetVisible ( basis, true ) 
            showCursor(true) 
        end 
    end 
    addCommandHandler ("anony", open) 
      
    

×
×
  • Create New...