Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. local tdui = include("tdui.lua")
  2.  
  3. AddCSLuaFile("tdui.lua")
  4.  
  5. local p
  6.  
  7. PlCheckATMValue = 120
  8.  
  9. ActualValue = 0
  10.  
  11. ATMCooldown = 0
  12.  
  13. hook.Add("PostDrawTranslucentRenderables", "Paint3D2DUI", function(bDrawingSkybox, bDrawingDepth)
  14.  
  15. for k, v in pairs( ents.FindByClass( "atm" ) ) do
  16.  
  17. if string.len(ActualValue) > 6 then ActualValue = 0 end
  18.  
  19. if bDrawingDepth then return end
  20.  
  21. local _zx = 0
  22.  
  23. local function allocateZone(name, w, h)
  24. local zx = _zx
  25. _zx = _zx + w + 10
  26.  
  27. p:Text(name, "!Roboto@18", zx + 5, -20, nil, TEXT_ALIGN_LEFT)
  28. p:Rect(zx, 0, w, h, tdui.COLOR_WHITE_TRANSPARENT, tdui.COLOR_WHITE)
  29. return zx + 5, 35
  30. end
  31.  
  32. p = p or tdui.Create()
  33.  
  34.  
  35. local x, y = allocateZone("", 151, 106)
  36.  
  37.  
  38. p:Rect(x, y-31, 142, 20, Color(255,255,255,30), color_white)
  39.  
  40.  
  41. p:Text("Solde : "..PlCheckATMValue.."€", "RoleplayFont_8", x + 70, y - 30, nil, TEXT_ALIGN_CENTER)
  42.  
  43.  
  44.  
  45.  
  46. local _jp, _press, _hover = p:Button("Retrait", "RoleplayFontThin_6", x + 85, y - 1, 55, 12,color_white,color_white)
  47.  
  48. if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
  49.  
  50. if _hover then p:Rect(x + 85, y - 1, 55, 12, Color(255,255,255,80), color_white) end
  51.  
  52. if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
  53.  
  54. p:Rect(x + 85, y - 1, 55, 12, Color(255,255,255,30), Color(255,255,255,30))
  55.  
  56.  
  57.  
  58. local _jp, _press, _hover = p:Button("Dépôt", "RoleplayFontThin_6", x + 85, y + 12, 55, 12,color_white,color_white)
  59.  
  60. if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
  61.  
  62. if _hover then p:Rect(x + 85, y + 12, 55, 12, Color(255,255,255,80), color_white) end
  63.  
  64. if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
  65.  
  66. p:Rect(x + 85, y + 12, 55, 12, Color(255,255,255,30), Color(255,255,255,30))
  67.  
  68.  
  69.  
  70.  
  71.  
  72. local _jp, _press, _hover = p:Button("<", "RoleplayFontThin_13", x + 65, y - 1, 15, 26,color_white,color_white)
  73.  
  74. if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
  75.  
  76. if _hover then p:Rect(x + 65, y - 1, 15, 26, Color(255,255,255,80), color_white) end
  77.  
  78. if _press and ( ATMCooldown <= CurTime() ) then ActualValue = ActualValue - 1 ATMCooldown = CurTime() + 0.5 end
  79.  
  80. p:Rect(x + 65, y - 1, 15, 26, Color(255,255,255,30), Color(255,255,255,30))
  81.  
  82.  
  83.  
  84.  
  85. local _jp, _press, _hover = p:Button("x", "RoleplayFontThin_13", x + 65, y + 28, 15, 29,color_white,color_white)
  86.  
  87. if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
  88.  
  89. if _hover then p:Rect(x + 65, y + 28, 15, 29, Color(255,255,255,80), color_white) end
  90.  
  91. if _press then ActualValue = 0 end
  92.  
  93. p:Rect(x + 65, y + 28, 15, 29, Color(255,255,255,30), Color(255,255,255,30))
  94.  
  95.  
  96.  
  97. p:Text(string.Comma(ActualValue), "RoleplayFontThin_9", x + 87, y + 34, nil, TEXT_ALIGN_LEFT)
  98.  
  99. p:Rect(x + 85, y + 28, 55, 29, Color(255,255,255,30), color_white)
  100.  
  101.  
  102.  
  103.  
  104. for i=1,3 do
  105.  
  106. local _jp, _press, _hover = p:Button(i, "RoleplayFontThin_8", x + 20 * i- 15, y - 0 * i, 15, 17,color_white,color_white)
  107.  
  108. if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
  109.  
  110. if _hover then p:Rect(x + 20 * i- 15, y - 0 * i, 15, 17, Color(255,255,255,80), color_white) end
  111.  
  112. if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
  113.  
  114. p:Rect(x + 20 * i- 15, y - 0 * i, 15, 17, Color(255,255,255,30), Color(255,255,255,30))
  115.  
  116. end
  117.  
  118.  
  119. for i=1,3 do
  120.  
  121. local _jp, _press, _hover = p:Button(3 + i, "RoleplayFontThin_8", x + 20 * i- 15, y - 0 * i + 20, 15, 17,color_white,color_white)
  122.  
  123. if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
  124.  
  125. if _hover then p:Rect(x + 20 * i- 15, y - 0 * i + 20, 15, 17, Color(255,255,255,80), color_white) end
  126.  
  127. if _press then vlr = 120 ActualValue = ActualValue + 3 + i end
  128.  
  129. p:Rect(x + 20 * i- 15, y - 0 * i + 20, 15, 17, Color(255,255,255,30), Color(255,255,255,30))
  130.  
  131. end
  132.  
  133.  
  134. for i=1,3 do
  135.  
  136. local _jp, _press, _hover = p:Button(6 + i, "RoleplayFontThin_8", x + 20 * i- 15, y - 0 * i + 40, 15, 17,color_white,color_white)
  137.  
  138. if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
  139.  
  140. if _hover then p:Rect(x + 20 * i- 15, y - 0 * i + 40, 15, 17, Color(255,255,255,80), color_white) end
  141.  
  142. if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
  143.  
  144. p:Rect(x + 20 * i- 15, y - 0 * i + 40, 15, 17, Color(255,255,255,30), color_white)
  145.  
  146. end
  147.  
  148. p:Cursor()
  149.  
  150.  
  151.  
  152. local Pos, Ang, pWidth = v:GetPos(), v:GetAngles() + Angle(-15,0,0.4), 279
  153.  
  154. Ang:RotateAroundAxis(Ang:Up(), 180)
  155.  
  156. p:Render(Pos + Ang:Up() * 26.59 + Ang:Forward() * -9.8 + Ang:Right() * -7.35, Ang, 0.11, 0.1)
  157.  
  158. end
  159.  
  160. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement