--[[ █████╗ ██╗ ██╗ ██╗███████╗███████╗ ██████╗██████╗ ██╔══██╗██║ ██║ ██║██╔════╝██╔════╝██╔════╝██╔══██╗ ███████║██║ ██║ ██║█████╗ ███████╗██║ ██████╔╝ ██╔══██║██║ ╚██╗ ██╔╝██╔══╝ ╚════██║██║ ██╔══██╗ ██║ ██║███████╗╚████╔╝ ███████╗███████║╚██████╗██║ ██║ ╚═╝ ╚═╝╚══════╝ ╚═══╝ ╚══════╝╚══════╝ ╚═════╝╚═╝ ╚═╝ --]] --/ Resolution \-- local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1366), (screenH/768) --/ Edit \-- config = { ["bind"] = "insert" --Bind para abrir o painel } --/ Required \-- local gui = { button = {}, window = {}, label = {}, edit = {} } --/ GUI \-- addEventHandler("onClientResourceStart", resourceRoot, function() gui.window[1] = guiCreateWindow(x*507, y*309, x*352, y*193, "Camera Matrix", false) guiWindowSetSizable(gui.window[1], false) gui.button[1] = guiCreateButton(x*10, y*141, x*114,y* 42, "Posição", false, gui.window[1]) gui.button[2] = guiCreateButton(x*228, y*141, x*114, y*42, "Copiar", false, gui.window[1]) gui.edit[1] = guiCreateEdit(x*19, y*65, x*313, y*45, "", false, gui.window[1]) guiEditSetReadOnly(gui.edit[1], true) gui.label[1] = guiCreateLabel(x*65, y*43, x*219, y*22, "Position", false, gui.window[1]) guiSetFont(gui.label[1], "default-bold-small") guiLabelSetHorizontalAlign(gui.label[1], "center", false) guiSetVisible(gui.window[1], false) end ) --/ Open \-- bindKey(config["bind"], "down", function() if guiGetVisible(gui.window[1]) then showCursor(false) guiSetVisible(gui.window[1], false) guiSetText(gui.edit[1], " ") else showCursor(true) guiSetVisible(gui.window[1], true) end end ) --/ ClickGUI \-- addEventHandler("onClientGUIClick", guiRoot, function() if guiGetVisible(gui.window[1]) then if (source == gui.button[1]) then local x, y, z, lx, ly, lz = getCameraMatrix () guiSetText(gui.edit[1], x..", "..y..", "..z..", "..lx..", "..ly.. ", "..lz) outputChatBox("* Posição gerada com sucesso!", 0, 255, 0, true) elseif (source == gui.button[2]) then if (guiGetText(gui.edit[1]) == "") then outputChatBox("* Erro inesperado, tente novamente!", 255, 0, 0, true) return end text = guiGetText(gui.edit[1]) setClipboard(text) outputChatBox("* Texto copiado com sucesso!", 255, 255, 0, true) end end end )