Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tdui = include("tdui.lua")
- AddCSLuaFile("tdui.lua")
- local p
- PlCheckATMValue = 120
- ActualValue = 0
- ATMCooldown = 0
- hook.Add("PostDrawTranslucentRenderables", "Paint3D2DUI", function(bDrawingSkybox, bDrawingDepth)
- for k, v in pairs( ents.FindByClass( "atm" ) ) do
- if string.len(ActualValue) > 6 then ActualValue = 0 end
- if bDrawingDepth then return end
- local _zx = 0
- local function allocateZone(name, w, h)
- local zx = _zx
- _zx = _zx + w + 10
- p:Text(name, "!Roboto@18", zx + 5, -20, nil, TEXT_ALIGN_LEFT)
- p:Rect(zx, 0, w, h, tdui.COLOR_WHITE_TRANSPARENT, tdui.COLOR_WHITE)
- return zx + 5, 35
- end
- p = p or tdui.Create()
- local x, y = allocateZone("", 151, 106)
- p:Rect(x, y-31, 142, 20, Color(255,255,255,30), color_white)
- p:Text("Solde : "..PlCheckATMValue.."€", "RoleplayFont_8", x + 70, y - 30, nil, TEXT_ALIGN_CENTER)
- local _jp, _press, _hover = p:Button("Retrait", "RoleplayFontThin_6", x + 85, y - 1, 55, 12,color_white,color_white)
- if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
- if _hover then p:Rect(x + 85, y - 1, 55, 12, Color(255,255,255,80), color_white) end
- if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
- p:Rect(x + 85, y - 1, 55, 12, Color(255,255,255,30), Color(255,255,255,30))
- local _jp, _press, _hover = p:Button("Dépôt", "RoleplayFontThin_6", x + 85, y + 12, 55, 12,color_white,color_white)
- if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
- if _hover then p:Rect(x + 85, y + 12, 55, 12, Color(255,255,255,80), color_white) end
- if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
- p:Rect(x + 85, y + 12, 55, 12, Color(255,255,255,30), Color(255,255,255,30))
- local _jp, _press, _hover = p:Button("<", "RoleplayFontThin_13", x + 65, y - 1, 15, 26,color_white,color_white)
- if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
- if _hover then p:Rect(x + 65, y - 1, 15, 26, Color(255,255,255,80), color_white) end
- if _press and ( ATMCooldown <= CurTime() ) then ActualValue = ActualValue - 1 ATMCooldown = CurTime() + 0.5 end
- p:Rect(x + 65, y - 1, 15, 26, Color(255,255,255,30), Color(255,255,255,30))
- local _jp, _press, _hover = p:Button("x", "RoleplayFontThin_13", x + 65, y + 28, 15, 29,color_white,color_white)
- if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
- if _hover then p:Rect(x + 65, y + 28, 15, 29, Color(255,255,255,80), color_white) end
- if _press then ActualValue = 0 end
- p:Rect(x + 65, y + 28, 15, 29, Color(255,255,255,30), Color(255,255,255,30))
- p:Text(string.Comma(ActualValue), "RoleplayFontThin_9", x + 87, y + 34, nil, TEXT_ALIGN_LEFT)
- p:Rect(x + 85, y + 28, 55, 29, Color(255,255,255,30), color_white)
- for i=1,3 do
- local _jp, _press, _hover = p:Button(i, "RoleplayFontThin_8", x + 20 * i- 15, y - 0 * i, 15, 17,color_white,color_white)
- if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
- if _hover then p:Rect(x + 20 * i- 15, y - 0 * i, 15, 17, Color(255,255,255,80), color_white) end
- if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
- p:Rect(x + 20 * i- 15, y - 0 * i, 15, 17, Color(255,255,255,30), Color(255,255,255,30))
- end
- for i=1,3 do
- local _jp, _press, _hover = p:Button(3 + i, "RoleplayFontThin_8", x + 20 * i- 15, y - 0 * i + 20, 15, 17,color_white,color_white)
- if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
- if _hover then p:Rect(x + 20 * i- 15, y - 0 * i + 20, 15, 17, Color(255,255,255,80), color_white) end
- if _press then vlr = 120 ActualValue = ActualValue + 3 + i end
- p:Rect(x + 20 * i- 15, y - 0 * i + 20, 15, 17, Color(255,255,255,30), Color(255,255,255,30))
- end
- for i=1,3 do
- local _jp, _press, _hover = p:Button(6 + i, "RoleplayFontThin_8", x + 20 * i- 15, y - 0 * i + 40, 15, 17,color_white,color_white)
- if _jp then p:Text("Just pressed", "!Roboto@18", x + 10, y + 60, nil, TEXT_ALIGN_LEFT) end
- if _hover then p:Rect(x + 20 * i- 15, y - 0 * i + 40, 15, 17, Color(255,255,255,80), color_white) end
- if _press then vlr = 120 p:Text("Pressing", "!Roboto@18", x + 10, y + 100, nil, TEXT_ALIGN_LEFT) end
- p:Rect(x + 20 * i- 15, y - 0 * i + 40, 15, 17, Color(255,255,255,30), color_white)
- end
- p:Cursor()
- local Pos, Ang, pWidth = v:GetPos(), v:GetAngles() + Angle(-15,0,0.4), 279
- Ang:RotateAroundAxis(Ang:Up(), 180)
- p:Render(Pos + Ang:Up() * 26.59 + Ang:Forward() * -9.8 + Ang:Right() * -7.35, Ang, 0.11, 0.1)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement