Tuş ile açılan panel komut ile açılsın istiyorum

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı zeatybaba

  • Yeni Üye
  • *
    • İleti: 4
Bende bir script var f6 basınca açılıyor bunu /dc yazınca açılmasını istiyorum kod bu :

-- Vitellius Deathplay

local DiscordLink = "Linki görebilmek için Kayıt olun yada Giriş yapın."  -- DC LİNKİ
local Botao = "F6"  -- PANELİ AÇMA TUŞU


local screenH, screenW = guiGetScreenSize()
local x, y = (screenH/1366), (screenW/768)
local Font = dxCreateFont("gfx/Roboto-Condensed.ttf", 13) -- FONT


cor = {}
function PainelDc()

    cor[1] = tocolor(0, 0, 0, 180)
    if isCursorOnElement(x*633, y*416, x*100, y*30) then 
        cor[1] = tocolor(30,144,255, 240)
    end

    cor[2] = tocolor(255, 255, 255, 200)
    if isCursorOnElement(x*797, y*290, x*23, y*22) then
        cor[2] = tocolor(255, 0, 0, 220)
    end

    dxDrawRectangle(x*547, y*312, x*273, y*144, tocolor(0, 0, 0, 180), false)
    dxDrawRectangle(x*547, y*290, x*273, y*22, tocolor(72,61,139), false) --72 61 139
    dxDrawText("✖", x*760, y*315, x*856, y*288, cor[2], x*1.4, "arial", "center", "center", false, false, false, false, false)
    dxDrawText("Vitellius Deathplay Discord", x*546, y*291, x*820, y*312, tocolor(255, 255, 255, 255), x*0.9, Font, "center", "center", false, false, false, false, false)
    dxDrawText(""..DiscordLink.."", x*546, y*420, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, false, false)
    dxDrawRectangle(x*633, y*416, x*100, y*30, cor[1], false)
    dxDrawText("Kopyala", x*546, y*550, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)


end


Painelstt = false

function OpenPainel()
    if Painelstt == false then
        addEventHandler("onClientRender", getRootElement(), PainelDc)
        Painelstt = true
        showCursor(true)

    else
        removeEventHandler("onClientRender", getRootElement(), PainelDc)
        Painelstt = false
        showCursor(false)

    end
end
bindKey(Botao, "down", OpenPainel)

function onClientButtonClick(Button, State)
    if Painelstt == true and Button == "left" and State == "down" then
        if isCursorOnElement(x*633, y*416, x*100, y*30) then
            setClipboard(""..DiscordLink.."")
            outputChatBox("#00ff00[!]#ffffff Discord Linki Kopyalandı!", 255, 255, 255, true)
            removeEventHandler("onClientRender", getRootElement(), PainelDc)
            Painelstt = false
            showCursor(false)

        elseif isCursorOnElement(x*797, y*290, x*23, y*22) then
            removeEventHandler("onClientRender", getRootElement(), PainelDc)
            Painelstt = false
            showCursor(false)
        else
        end
    end
end
addEventHandler("onClientClick", getRootElement(), onClientButtonClick)


function isCursorOnElement( posX, posY, width, height )
    if isCursorShowing( ) then
        local mouseX, mouseY = getCursorPosition( )
        local clientW, clientH = guiGetScreenSize( )
        local mouseX, mouseY = mouseX * clientW, mouseY * clientH
        if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then
            return true
        end
    end
    return false
end
 


MTASATURK


Çevrimdışı xMert

  • Bilişim Teknolojileri
  • Moderatör
  • *
    • İleti: 435
  • C++
    • MTASATURK
Lütfen forum kurallarını okuduktan sonra konu açın. Konu türü eki eklenmediği için konu çöpe taşınmıştır.