Jump to content

Help


S3Nn4oXx

Recommended Posts

Hey guys, I made a little script, I forgot a lot of things when I was Inactive

I want when I press on a button, I've to wait 5 seconds, and look at this problem, when I press Z - binded the menu doesn't appear.. I know I've to do something with 'onClientRender'

function menu() 
        faggot = guiCreateButton(759, 440, 76, 36, "", false) 
        guiSetAlpha(faggot, 0.00) 
         
        addEventHandler ( "onClientGUIClick", faggot, faggots, false ) 
  
        fuckyou = guiCreateButton(544, 441, 76, 36, "", false) 
        guiSetAlpha(fuckyou, 0.00) 
         
        addEventHandler ( "onClientGUIClick", fuckyou, fuckyous, false ) 
  
        getnoscope = guiCreateButton(759, 326, 76, 36, "", false) 
        guiSetAlpha(getnoscope, 0.00) 
  
        addEventHandler ( "onClientGUIClick", getnoscope, noscopes, false ) 
         
        gay = guiCreateButton(544, 323, 76, 36, "", false) 
        guiSetAlpha(gay, 0.00)  
  
        addEventHandler ( "onClientGUIClick", gay, gays, false ) 
        dxDrawRectangle(853, 250, 0, 185, tocolor(255, 255, 255, 255), false) 
        dxDrawLine(491 - 1, 227 - 1, 491 - 1, 542, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(875, 227 - 1, 491 - 1, 227 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(491 - 1, 542, 875, 542, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(875, 542, 875, 227 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawRectangle(491, 227, 384, 315, tocolor(27, 27, 27, 202), false) 
        dxDrawLine(491 - 1, 227 - 1, 491 - 1, 271, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(875, 227 - 1, 491 - 1, 227 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(491 - 1, 271, 875, 271, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(875, 271, 875, 227 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawRectangle(491, 227, 384, 44, tocolor(31, 171, 0, 202), false) 
        dxDrawText("SpRoXx's Sound System", 591, 237, 975, 279, tocolor(255, 255, 255, 255), 1.50, "default", "left", "top", false, false, false, false, false) 
        dxDrawLine(544 - 1, 324 - 1, 544 - 1, 359, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(618, 324 - 1, 544 - 1, 324 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(544 - 1, 359, 618, 359, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(618, 359, 618, 324 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawRectangle(544, 324, 74, 35, tocolor(31, 171, 0, 202), false) 
        dxDrawText("Gay", 568, 331, 644, 351, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, false, false, false) 
        dxDrawLine(759 - 1, 327 - 1, 759 - 1, 362, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(833, 327 - 1, 759 - 1, 327 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(759 - 1, 362, 833, 362, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(833, 362, 833, 327 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawRectangle(759, 327, 74, 35, tocolor(31, 171, 0, 202), false) 
        dxDrawText("NoScope", 769, 334, 845, 354, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, false, false, false) 
        dxDrawLine(544 - 1, 442 - 1, 544 - 1, 477, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(618, 442 - 1, 544 - 1, 442 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(544 - 1, 477, 618, 477, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(618, 477, 618, 442 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawRectangle(544, 442, 74, 35, tocolor(31, 171, 0, 202), false) 
        dxDrawText("Fk you", 559, 450, 635, 470, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, false, false, false) 
        dxDrawLine(759 - 1, 441 - 1, 759 - 1, 476, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(833, 441 - 1, 759 - 1, 441 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(759 - 1, 476, 833, 476, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawLine(833, 476, 833, 441 - 1, tocolor(31, 171, 0, 202), 1, false) 
        dxDrawRectangle(759, 441, 74, 35, tocolor(31, 171, 0, 202), false) 
        dxDrawText("Faggot !", 769, 449, 845, 469, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, false, false, false) 
        dxDrawText("Fuck the system | fts", 630, 393, 829, 416, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
end 
  
  
function open() 
    if removeEventHandler('onClientRender', root, menu) then 
    removeEventHandler('onClientRender', root, menu) 
    guiSetVisible(fuckyou,false) 
    guiSetVisible(getnoscope,false) 
    guiSetVisible(gay,false) 
    guiSetVisible(faggot,false) 
    showCursor(false) 
else 
    addEventHandler('onClientRender', root, menu) 
    guiSetVisible(fuckyou,true) 
    guiSetVisible(getnoscope,true) 
    guiSetVisible(gay,true) 
    guiSetVisible(faggot,false) 
    showCursor(true) 
end 
end 
    bindKey( "F2", "down", open) 
  
  
  
function faggots( button ) 
    if button == "left" then 
        local sound = playSound("sounds/faggot.mp3") 
    end 
end 
  
function gays( button ) 
    if button == "left" then 
       local sound = playSound("sounds/gay.mp3") 
    end  
end 
  
function noscopes( button ) 
    if button == "left" then  
        local sound = playSound("sounds/noscope.mp3") 
    end 
end 
  
function fuckyous( button ) 
    if button == "left" then 
        local sound = playSound("sounds/fuckyou.mp3") 
    end 
end  

Link to comment
  • 4 weeks later...
  
local itsopen = false 
function open() 
    if itsopen then 
        removeEventHandler('onClientRender', root, menu) 
        guiSetVisible(,false) 
        guiSetVisible(getnoscope,false) 
        guiSetVisible(gay,false) 
        guiSetVisible(,false) 
        showCursor(false) 
        itsopen = false 
    else 
        addEventHandler('onClientRender', root, menu) 
        guiSetVisible(,true) 
        guiSetVisible(getnoscope,true) 
        guiSetVisible(gay,true) 
        guiSetVisible(,false) 
        showCursor(true) 
        itsopen = true 
    end 
end 
bindKey( "F2", "down", open) 
  

Link to comment
  
local itsopen = false 
function open() 
    if itsopen then 
        removeEventHandler('onClientRender', root, menu) 
        guiSetVisible(,false) 
        guiSetVisible(getnoscope,false) 
        guiSetVisible(gay,false) 
        guiSetVisible(,false) 
        showCursor(false) 
        itsopen = false 
    else 
        addEventHandler('onClientRender', root, menu) 
        guiSetVisible(,true) 
        guiSetVisible(getnoscope,true) 
        guiSetVisible(gay,true) 
        guiSetVisible(,false) 
        showCursor(true) 
        itsopen = true 
    end 
end 
bindKey( "F2", "down", open) 
  

Link to comment

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