Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sx, sy = guiGetScreenSize()
- local zoom = 1920/sx
- local f1 = {}
- function scaleX(type, value)
- if type == 'center' then
- return math.floor(sx/2 - value/zoom)
- elseif type == 'left' then
- return math.floor(sx - value/zoom)
- elseif type == 'right' then
- return math.floor(value/zoom)
- end
- end
- function scaleY(type, value)
- if type == 'center' then
- return math.floor(sy/2 - value/zoom)
- elseif type == 'top' then
- return math.floor(value/zoom)
- elseif type == 'down' then
- return math.floor(sy - value/zoom)
- end
- end
- function scaleImage(value)
- return math.floor(value/zoom)
- end
- 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 )
- return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) )
- end
- f1.texture = {
- logo = dxCreateTexture('assets/img/logo.png', 'argb', false, 'clamp')
- };
- f1.font = {
- normal = dxCreateFont('assets/font/font.ttf', 15/zoom, false, 'antialiased'),
- bold = dxCreateFont('assets/font/font-bold.ttf', 15/zoom, false, 'antialiased')
- };
- page = 1
- function helpPanel()
- if page == 1 then
- dxDrawRectangle(335, 265, 1250, 550, tocolor(0, 0, 0, 220), false)
- dxDrawRectangle(543, 265, 1042, 550, tocolor(29, 29, 29, 220), false)
- dxDrawImage(344, 265, 180, 180, f1.texture['logo'], 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawText("INFORMACJE", 344, 476, 524, 514, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("PRZEWODNIK", 344, 524, 524, 562, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("ANIMACJE", 344, 572, 524, 610, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false,false, false, false)
- dxDrawText("AKTUALIZACJE", 344, 620, 524, 658, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- end
- if page == 2 then
- dxDrawRectangle(335, 265, 1250, 550, tocolor(0, 0, 0, 220), false)
- dxDrawRectangle(543, 265, 1042, 550, tocolor(29, 29, 29, 220), false)
- dxDrawImage(344, 265, 180, 180, f1.texture['logo'], 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawRectangle(335, 476, 208, 38, tocolor(29, 29, 29, 220), false)
- dxDrawText("INFORMACJE", 344, 476, 524, 514, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("PRZEWODNIK", 344, 524, 524, 562, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("ANIMACJE", 344, 572, 524, 610, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false,false, false, false)
- dxDrawText("AKTUALIZACJE", 344, 620, 524, 658, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawRectangle(563, 285, 6, 38, tocolor(200, 4, 4, 254), false)
- dxDrawText("INFORMACJE", 559, 285, 739, 323, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false,false, false, false, false)
- end
- if page == 3 then
- dxDrawRectangle(335, 265, 1250, 550, tocolor(0, 0, 0, 220), false)
- dxDrawRectangle(543, 265, 1042, 550, tocolor(29, 29, 29, 220), false)
- dxDrawImage(344, 265, 180, 180, f1.texture['logo'], 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawRectangle(344, 524, 208, 38, tocolor(29, 29, 29, 220), false)
- dxDrawText("INFORMACJE", 344, 476, 524, 514, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("PRZEWODNIK", 344, 524, 524, 562, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("ANIMACJE", 344, 572, 524, 610, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false,false, false, false)
- dxDrawText("AKTUALIZACJE", 344, 620, 524, 658, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawRectangle(563, 285, 6, 38, tocolor(200, 4, 4, 254), false)
- dxDrawText("PRZEWODNIK", 559, 285, 739, 323, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false,false, false, false, false)
- end
- if page == 4 then
- dxDrawRectangle(335, 265, 1250, 550, tocolor(0, 0, 0, 220), false)
- dxDrawRectangle(543, 265, 1042, 550, tocolor(29, 29, 29, 220), false)
- dxDrawImage(344, 265, 180, 180, f1.texture['logo'], 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawRectangle(344, 620, 208, 38, tocolor(29, 29, 29, 220), false)
- dxDrawText("INFORMACJE", 344, 476, 524, 514, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("PRZEWODNIK", 344, 524, 524, 562, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("ANIMACJE", 344, 572, 524, 610, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false,false, false, false)
- dxDrawText("AKTUALIZACJE", 344, 620, 524, 658, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawRectangle(563, 285, 6, 38, tocolor(200, 4, 4, 254), false)
- dxDrawText("ANIMACJE", 559, 285, 739, 323, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false,false, false, false, false)
- end
- if page == 5 then
- dxDrawRectangle(335, 265, 1250, 550, tocolor(0, 0, 0, 220), false)
- dxDrawRectangle(543, 265, 1042, 550, tocolor(29, 29, 29, 220), false)
- dxDrawImage(344, 265, 180, 180, f1.texture['logo'], 0, 0, 0, tocolor(255, 255, 255, 255), false)
- dxDrawRectangle(344, 620, 208, 38, tocolor(29, 29, 29, 220), false)
- dxDrawText("INFORMACJE", 344, 476, 524, 514, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("PRZEWODNIK", 344, 524, 524, 562, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawText("ANIMACJE", 344, 572, 524, 610, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false,false, false, false)
- dxDrawText("AKTUALIZACJE", 344, 620, 524, 658, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false, false, false, false, false)
- dxDrawRectangle(563, 285, 6, 38, tocolor(200, 4, 4, 254), false)
- dxDrawText("AKTUALIZACJE", 559, 285, 739, 323, tocolor(255, 255, 255, 255), 1.00, f1.font['bold'], "center", "center", false,false, false, false, false)
- end
- end
- addEventHandler('onClientClick',root,function(btn, state)
- if btn=='left' and state=='down' then
- if isMouseInPosition(344, 476, 524, 514) then
- page = 2
- elseif isMouseInPosition(344, 524, 524, 562) then
- page = 3
- elseif isMouseInPosition(344, 572, 524, 610) then
- page = 4
- elseif isMouseInPosition(344, 620, 524, 658) then
- page = 5
- end
- end
- end)
- function F1PANEL()
- if F1PANEL == false then
- addEventHandler('onClientRender',root,helpPanel)
- F1PANEL=true
- showChat(false)
- showCursor(true)
- else
- removeEventHandler('onClientRender',root,helpPanel)
- F1PANEL=false
- showChat(true)
- showCursor(false)
- end
- end
- bindKey('F1','down',F1PANEL)
Add Comment
Please, Sign In to add comment