Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.30 KB | None | 0 0
  1. ---------------
  2. -- VARIABLEN --
  3. ---------------
  4. local x, y = guiGetScreenSize()
  5. local trucker_window = false
  6. local trucker = {button = {}}
  7.  
  8. function isCursorOnElement(x,y,w,h)
  9.     local mx,my = getCursorPosition ()
  10.     local fullx,fully = guiGetScreenSize()
  11.     cursorx,cursory = mx*fullx,my*fully
  12.     if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
  13.         return true
  14.     else
  15.         return false
  16.     end
  17. end
  18.  
  19. ---------------
  20. -- FENSTER 1 --
  21. ---------------
  22. local step = 0.03
  23. local x, y = guiGetScreenSize()
  24. local progress = 0
  25. local fadeIn = true
  26.  
  27. function trucker_window_info()
  28.     if fadeIn then
  29.         progress = progress + step
  30.         if progress > 1 then
  31.             progress = 1
  32.         end
  33.     else
  34.         progress = progress - step
  35.         if progress < 0 then
  36.             progress = 0
  37.             removeEventHandler("onClientRender",getRootElement(),infoboxRender)
  38.         end
  39.     end
  40.    
  41.     dxDrawImage(1453*x/1920, 906*y/1080, 91*x/1920, 193, "images/skins/trucker.png", 0, 0, 0, tocolor(255, 255, 255, 255*progress), false)
  42.     dxDrawRectangle(1007*x/1920, 849*y/1080, 547*x/1920, 27*y/1080, tocolor(49, 49, 49, 255*progress), false)
  43.     dxDrawRectangle(1007*x/1920, 876*y/1080, 547*x/1920, 2*y/1080, tocolor(255, 157, 0, 255*progress), false)
  44.     dxDrawRectangle(1007*x/1920, 878*y/1080, 547*x/1920, 192*y/1080, tocolor(239, 239, 239, 255*progress), false)
  45.     dxDrawRectangle(1715*x/1920, 752*y/1080, 0*x/1920, 0*y/1080, tocolor(255, 255, 255, 255*progress), false)
  46.     dxDrawImage(1453*x/1920, 906*y/1080, 91*x/1920, 193, "images/skins/trucker.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  47.     dxDrawText("Informationen", 1013*x/1920, 849*y/1080, 1101*x/1920, 876*y/1080, tocolor(255, 254, 254, 255), 1.00, "default-bold", "left", "center", false, false, false, false, false)
  48.     dxDrawText("Hier findest du alle Informationen zum dem Job Lieferrant! ", 1017 - 1*x/1920, 886 - 1*y/1080, 1163 - 1*x/1920, 1007 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  49.     dxDrawText("Hier findest du alle Informationen zum dem Job Lieferrant! ", 1017 + 1*x/1920, 886 - 1*y/1080, 1163 + 1*x/1920, 1007 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  50.     dxDrawText("Hier findest du alle Informationen zum dem Job Lieferrant! ", 1017 - 1*x/1920, 886 + 1*y/1080, 1163 - 1*x/1920, 1007 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  51.     dxDrawText("Hier findest du alle Informationen zum dem Job Lieferrant! ", 1017 + 1*x/1920, 886 + 1*y/1080, 1163 + 1*x/1920, 1007 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  52.     dxDrawText("Hier findest du alle Informationen zum dem Job Lieferrant! ", 1017*x/1920, 886*y/1080, 1163*x/1920, 1007*y/1080, tocolor(255, 254, 254, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  53.     dxDrawImage(1134*x/1920, 1039*y/1080, 29*x/1920, 27*y/1080, "images/blips/flag.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  54.     dxDrawImage(1017*x/1920, 1039*y/1080, 29*x/1920, 27*y/1080, "images/blips/airport.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  55.     dxDrawImage(1056*x/1920, 1039*y/1080, 29*x/1920, 27*y/1080, "images/blips/skinshop.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  56.     dxDrawImage(1095*x/1920, 1039*y/1080, 29*x/1920, 27*y/1080, "images/blips/burger.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
  57.     dxDrawText("Abgabepunkte", 1017 - 1*x/1920, 1017 - 1*y/1080, 1163 - 1*x/1920, 1039 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
  58.     dxDrawText("Abgabepunkte", 1017 + 1*x/1920, 1017 - 1*y/1080, 1163 + 1*x/1920, 1039 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
  59.     dxDrawText("Abgabepunkte", 1017 - 1*x/1920, 1017 + 1*y/1080, 1163 - 1*x/1920, 1039 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
  60.     dxDrawText("Abgabepunkte", 1017 + 1*x/1920, 1017 + 1*y/1080, 1163 + 1*x/1920, 1039 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
  61.     dxDrawText("Abgabepunkte", 1017*x/1920, 1017*y/1080, 1163*x/1920, 1039*y/1080, tocolor(255, 254, 254, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
  62.     dxDrawText("Text", 1173 - 1*x/1920, 886 - 1*y/1080, 1293 - 1*x/1920, 1060 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  63.     dxDrawText("Text", 1173 + 1*x/1920, 886 - 1*y/1080, 1293 + 1*x/1920, 1060 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  64.     dxDrawText("Text", 1173 - 1*x/1920, 886 + 1*y/1080, 1293 - 1*x/1920, 1060 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  65.     dxDrawText("Text", 1173 + 1*x/1920, 886 + 1*y/1080, 1293 + 1*x/1920, 1060 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  66.     dxDrawText("Text", 1173*x/1920, 886*y/1080, 1293*x/1920, 1060*y/1080, tocolor(255, 254, 254, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  67.     dxDrawText("Text2", 1309 - 1*x/1920, 886 - 1*y/1080, 1429 - 1*x/1920, 1060 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  68.     dxDrawText("Text2", 1309 + 1*x/1920, 886 - 1*y/1080, 1429 + 1*x/1920, 1060 - 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  69.     dxDrawText("Text2", 1309 - 1*x/1920, 886 + 1*y/1080, 1429 - 1*x/1920, 1060 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  70.     dxDrawText("Text2", 1309 + 1*x/1920, 886 + 1*y/1080, 1429 + 1*x/1920, 1060 + 1*y/1080, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  71.     dxDrawText("Text2", 1309*x/1920, 886*y/1080, 1429*x/1920, 1060*y/1080, tocolor(255, 254, 254, 255), 1.00, "default-bold", "center", "center", true, true, false, false, false)
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement