View difference between Paste ID: xWXc6X7j and XXWL50Ai
SHOW: | | - or go back to the newest paste.
1
surface.CreateFont( "police1", {
2
	font = "KaiserzeitGotisch",
3
	extended = false,
4
	size = 18,
5
	weight = 500,
6
	blursize = 0,
7
	scanlines = 0,
8
	antialias = true,
9
	underline = false,
10
	italic = false,
11
	strikeout = false,
12
	symbol = false,
13
	rotary = false,
14
	shadow = false,
15
	additive = false,
16
	outline = true,
17
} )
18
19
surface.CreateFont( "police2", {
20
	font = "KaiserzeitGotisch",
21
	extended = false,
22
	size = 35,
23
	weight = 500,
24
	blursize = 0,
25
	scanlines = 0,
26
	antialias = true,
27
	underline = false,
28
	italic = false,
29
	strikeout = false,
30
	symbol = false,
31
	rotary = false,
32
	shadow = false,
33
	additive = false,
34
	outline = true,
35
} )
36
37
resource.AddFile( "materials/hud/hud.png" )
38
hook.Add("HUDPaint", "TutoHUD", function()
39
local hud = Material("materials/hud/hud.png"); 
40
surface.SetMaterial(hud); 
41
surface.SetDrawColor(255,255,255,255) 
42
surface.DrawTexturedRect( ScrW()/2-675, 0, 550,170); 
43
local health = LocalPlayer():Health()
44
local armor = LocalPlayer():Armor()
45
local username = LocalPlayer():GetName()
46
local money = LocalPlayer():getDarkRPVar("money") 
47
draw.RoundedBox( 0, ScrW()/9.7, 49, math.Clamp(LocalPlayer():Health(),0, 242), 11, Color(85,215,0) )
48
draw.RoundedBox( 0, ScrW()/9.7, 72, math.Clamp(LocalPlayer():Armor(),0, 198), 11, Color(0,142,255) )
49
draw.SimpleText("santé: "..health, "police1" , 230, ScrH() - 722, Color (255,255,255))
50
draw.SimpleText("armure: "..armor, "police1" , 210, ScrH() - 700, Color (255,255,255))
51
draw.SimpleText(username, "police2", 175, ScrH() - 756, Color (255,255,255))
52
draw.SimpleText(money.." €", "police1", 165, ScrH() - 672, Color (255,255,255))
53
54
end)
55
56
--HIDE DEFAULT HUD
57
local hideHUDElements = {
58
	["DarkRP_LocalPlayerHUD"] = true,
59
	["DarkRP_Agenda"] = true,
60
	["DarkRP_Hungermod"] = true,
61
}
62
hook.Add("HUDShouldDraw", "HideDefaultDarkRPHud", function(name)
63
	if hideHUDElements[name] then return false end
64
end)
65
66
local hide = {}
67
hide[ "CHudHealth" ] = true
68
hide[ "CHudBattery" ] = true
69
hook.Add( "HUDShouldDraw", "HideHUD", function( name )
70
	if hide[ name ] then
71
		return false
72
	end
73
end )