Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.13 KB | None | 0 0
  1. -- kliens
  2. local sx = guiGetScreenSize(getLocalPlayer())
  3. local show = false
  4. local x,y = guiGetScreenSize()
  5. local ddx, ddy = guiGetScreenSize()
  6. function inbox(ddx, ddy, bx, by)
  7.     if isCursorShowing() then
  8.         local mx, my = getCursorPosition()
  9.         mx, my = mx*x, my*y
  10.         bx, by = ddx+bx, ddy+by
  11.         return ddx <= mx and bx >= mx and ddy <= my and by >= my
  12.     end
  13. end
  14. function dobozbaKattint(dX, dY, dSz, dM, eX, eY)
  15.     if(eX >= dX and eX <= dX+dSz and eY >= dY and eY <= dY+dM) then
  16.         return true
  17.     else
  18.         return false
  19.     end
  20. end
  21. exports["om_blur"]:removeBlur("score")
  22.  
  23.  
  24. function render()
  25.     if show then
  26.         dxDrawRectangle(sx/2-445,sx/2-705,900,510,tocolor(0,0,0,75))
  27.         dxDrawRectangle(sx/2-445,sx/2-180,900,85,tocolor(0,0,0,75))
  28.  
  29.         dxDrawRectangle(sx/2-450,sx/2-700,900,500,tocolor(0,0,0,75))
  30.         dxDrawRectangle(sx/2-450,sx/2-175,900,75,tocolor(0,0,0,75))
  31.  
  32.         dxDrawRectangle(sx/2-400,sx/2-162.5,150,50,tocolor(0,0,0,75))
  33.         dxDrawRectangle(sx/2-200,sx/2-162.5,150,50,tocolor(0,0,0,75))
  34.         dxDrawRectangle(sx/2,sx/2-162.5,150,50,tocolor(0,0,0,75))
  35.         dxDrawRectangle(sx/2+200,sx/2-162.5,150,50,tocolor(0,0,0,75))
  36.  
  37.         dxDrawText("Adatok",sx/2-355,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  38.         dxDrawText("Adminok",sx/2-160,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  39.         dxDrawText("Vagyon",sx/2+40,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  40.         dxDrawText("Beállítások",sx/2+225,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  41.  
  42.         dxDrawImage(sx/2-450,sx/2-780,100,100,"files/images/logo/logo.png")
  43.         dxDrawText("once",sx/2-370,sx/2-760,154,154,tocolor(255,255,255,255),2.5,"default-bold")
  44.         dxDrawText("MTA",sx/2-295,sx/2-760,154,154,tocolor(230,67,67,255),2.5,"default-bold")
  45.  
  46.         if inbox(sx/2-400,sx/2-162.5,150,50) then
  47.             dxDrawRectangle(sx/2-395,sx/2-157.5,140,40,tocolor(230,67,67,150))
  48.             dxDrawText("Adatok",sx/2-355,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  49.         end
  50.         if inbox(sx/2-200,sx/2-162.5,150,50) then
  51.             dxDrawRectangle(sx/2-195,sx/2-157.5,140,40,tocolor(230,67,67,150))
  52.             dxDrawText("Adminok",sx/2-160,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  53.         end
  54.         if inbox(sx/2,sx/2-162.5,150,50) then
  55.             dxDrawRectangle(sx/2+5,sx/2-157.5,140,40,tocolor(230,67,67,150))
  56.             dxDrawText("Vagyon",sx/2+40,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  57.         end
  58.         if inbox(sx/2+200,sx/2-162.5,150,50) then
  59.             dxDrawRectangle(sx/2+205,sx/2-157.5,140,40,tocolor(230,67,67,150))
  60.             dxDrawText("Beállítások",sx/2+225,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  61.         end
  62.     end
  63.     if show and oldal == 0 then
  64.     end
  65.     if show and oldal == 1 then
  66.         dxDrawRectangle(sx/2-395,sx/2-157.5,140,40,tocolor(230,67,67,255))
  67.         dxDrawText("Adatok",sx/2-355,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  68.         dxDrawRectangle(sx/2+251,sx/2-581,138,266,tocolor(0,0,0,150))
  69.         dxDrawRectangle(sx/2+251,sx/2-610,138,25,tocolor(0,0,0,150))
  70.         dxDrawImage( sx/2+256,sx/2-576,128,256, "files/images/skins/na.jpg")
  71.         dxDrawImage( sx/2+256,sx/2-576,128,256, "files/images/skins/" .. getElementModel( localPlayer ) .. ".jpg")
  72.         dxDrawText("Skined:",sx/2+286,sx/2-610,128,256,tocolor(255,255,255,255),1.5,"default-bold")
  73.        
  74.         dxDrawRectangle(sx/2-400,sx/2-610,250,25,tocolor(0,0,0,150))
  75.         dxDrawRectangle(sx/2-400,sx/2-580,250,25,tocolor(0,0,0,150))
  76.         dxDrawRectangle(sx/2-400,sx/2-550,250,25,tocolor(0,0,0,150))
  77.         dxDrawRectangle(sx/2-400,sx/2-520,250,25,tocolor(0,0,0,150))
  78.         dxDrawRectangle(sx/2-400,sx/2-490,250,25,tocolor(0,0,0,150))
  79.         dxDrawRectangle(sx/2-400,sx/2-460,250,25,tocolor(0,0,0,150))
  80.         dxDrawRectangle(sx/2-400,sx/2-430,250,25,tocolor(0,0,0,150))
  81.         dxDrawRectangle(sx/2-400,sx/2-400,250,25,tocolor(0,0,0,150))
  82.         dxDrawRectangle(sx/2-400,sx/2-370,250,25,tocolor(0,0,0,150))
  83.         dxDrawRectangle(sx/2-400,sx/2-340,250,25,tocolor(0,0,0,150))
  84.         dxDrawRectangle(sx/2-400,sx/2-310,250,25,tocolor(0,0,0,150))
  85.         dxDrawRectangle(sx/2-400,sx/2-280,250,25,tocolor(0,0,0,150))
  86.         dxDrawText("Név:",sx/2-390,sx/2-610,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  87.         dxDrawText("Kor:",sx/2-390,sx/2-580,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  88.         dxDrawText("Skin ID:",sx/2-390,sx/2-550,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  89.         dxDrawText("Account ID:",sx/2-390,sx/2-520,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  90.         dxDrawText("Prémium egyenleg:",sx/2-390,sx/2-490,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  91.         dxDrawText("Háziállat neve:",sx/2-390,sx/2-460,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  92.         dxDrawText("Pénz:",sx/2-390,sx/2-430,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  93.         dxDrawText("Banki pénz:",sx/2-390,sx/2-400,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  94.         dxDrawText("Munka:",sx/2-390,sx/2-370,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  95.         dxDrawText("Játszott idő:",sx/2-390,sx/2-340,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  96.         dxDrawText("Admin szint:",sx/2-390,sx/2-310,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  97.         dxDrawText("Admin név:",sx/2-390,sx/2-280,250,25,tocolor(255,255,255,255),1.5,"default-bold")
  98.     end
  99.     if show and oldal == 2 then
  100.         dxDrawRectangle(sx/2-195,sx/2-157.5,140,40,tocolor(230,67,67,255))
  101.         dxDrawText("Adminok",sx/2-160,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  102.         dxDrawRectangle(sx/2-400,sx/2-610,250,25,tocolor(0,0,0,150))
  103.     end
  104.     if show and oldal == 3 then
  105.         dxDrawRectangle(sx/2+5,sx/2-157.5,140,40,tocolor(230,67,67,255))
  106.         dxDrawText("Vagyon",sx/2+40,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  107.     end
  108.     if show and oldal == 4 then
  109.         dxDrawRectangle(sx/2+205,sx/2-157.5,140,40,tocolor(230,67,67,255))
  110.         dxDrawText("Beállítások",sx/2+225,sx/2-150,150,50,tocolor(255,255,255,255),1.5,"default-bold")
  111.     end
  112. end
  113. addEventHandler("onClientRender",root,render)
  114.  
  115. function dobozKatt(gomb,statusz,xx,yy)
  116.     if show then
  117.         if(gomb == "left" and statusz == "down") then
  118.             if(dobozbaKattint(sx/2-400,sx/2-162.5,150,50, xx, yy)) then
  119.                 playSound("files/sounds/click.mp3")
  120.                 oldal = 1
  121.             end
  122.             if(dobozbaKattint(sx/2-200,sx/2-162.5,150,50, xx, yy)) then
  123.                 playSound("files/sounds/click.mp3")
  124.                 oldal = 2
  125.             end
  126.             if(dobozbaKattint(sx/2,sx/2-162.5,150,50, xx, yy)) then
  127.                 playSound("files/sounds/click.mp3")
  128.                 oldal = 3
  129.             end
  130.             if(dobozbaKattint(sx/2+200,sx/2-162.5,150,50, xx, yy)) then
  131.                 playSound("files/sounds/click.mp3")
  132.                 oldal = 4
  133.             end
  134.         end
  135.     end
  136. end
  137.  
  138. local time = 0
  139. function showdash()
  140.     if getTickCount()-time <= 3000 and not show then
  141.         outputChatBox("#E64343[Dashboard] #ffffffKérlek várj #E643433 #ffffffmásodpercet!",255,0,0,true)
  142.         return
  143.     else
  144.         openedTime = getTickCount()
  145.     end
  146.  
  147.     if show then
  148.         exports["om_blur"]:removeBlur("score")
  149.         showChat(true)
  150.         showCursor(false)
  151.         removeEventHandler("onClientClick",root,dobozKatt)
  152.         show = false
  153.         playSound("files/sounds/switch.mp3")
  154.         oldal = 0
  155.     else       
  156.         showChat(false)
  157.         exports["om_blur"]:createBlur("score", 20)
  158.         showCursor(true)
  159.         addEventHandler("onClientClick",root,dobozKatt)
  160.         show = true
  161.         playSound("files/sounds/switch.mp3")
  162.         oldal = 2
  163.     end
  164. end
  165. bindKey("f6","down",showdash)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement