- Initiateur de la discussion
Glife
Têtard
- Messages
- 3
- Score réaction
- 0
- Points
- 10
Bonjour,
J'ai un problème.
J'ai créer un addons qui s'apelles Pardise et j'ai fait un HUD dans ./autorun/client
Et en jeux l'hud ne veut pas marcher !
Code :
hook.Add( "HUDPaint", "HUD", function()
local function DisplayNotify(msg)
local txt = msg:ReadString()
GAMEMODE:AddNotify(txt, msg:ReadShort(), msg:ReadLong())
surface.PlaySound("buttons/lightswitch2.wav")
MsgC(Color(255, 20, 20, 255), "[PARADISE] ", Color(200, 200, 200, 255), txt, "\n")
end
usermessage.Hook("_Notify", DisplayNotify)
local vie = LocalPlayer():Health()
local armure = LocalPlayer():Armor()
local food = LocalPlayer():getDarkRPVar("Energy")
draw.RoundedBox(6, 8, ScrH() - 64, 200, 14, Color(0,0,0,180))
draw.RoundedBox(6, 8, ScrH() - 44, 200, 14, Color(0,0,0,180))
draw.RoundedBox(6, 8, ScrH() - 24, 200, 14, Color(0,0,0,180))
draw.RoundedBox(6, 8, ScrH() - 64, vie * 2, 14, Color(189,24,24, 200))
draw.RoundedBox(6, 8, ScrH() - 44, armure * 2, 14, Color(41, 128, 185, 200))
draw.RoundedBox(6, 8, ScrH() - 24, food * 2, 14, Color(21,153,0,180))
end )
-- Retirer le HUD de base sur GMOD
hook.Add( "HUDShouldDraw", "DefautHUD", function( name )
if ( name == "CHudHealth" or name == "CHudBattery" ) then
return false
end
end )
Photo de l’aperçu en jeux >
J'ai un problème.
J'ai créer un addons qui s'apelles Pardise et j'ai fait un HUD dans ./autorun/client
Et en jeux l'hud ne veut pas marcher !
Code :
hook.Add( "HUDPaint", "HUD", function()
local function DisplayNotify(msg)
local txt = msg:ReadString()
GAMEMODE:AddNotify(txt, msg:ReadShort(), msg:ReadLong())
surface.PlaySound("buttons/lightswitch2.wav")
MsgC(Color(255, 20, 20, 255), "[PARADISE] ", Color(200, 200, 200, 255), txt, "\n")
end
usermessage.Hook("_Notify", DisplayNotify)
local vie = LocalPlayer():Health()
local armure = LocalPlayer():Armor()
local food = LocalPlayer():getDarkRPVar("Energy")
draw.RoundedBox(6, 8, ScrH() - 64, 200, 14, Color(0,0,0,180))
draw.RoundedBox(6, 8, ScrH() - 44, 200, 14, Color(0,0,0,180))
draw.RoundedBox(6, 8, ScrH() - 24, 200, 14, Color(0,0,0,180))
draw.RoundedBox(6, 8, ScrH() - 64, vie * 2, 14, Color(189,24,24, 200))
draw.RoundedBox(6, 8, ScrH() - 44, armure * 2, 14, Color(41, 128, 185, 200))
draw.RoundedBox(6, 8, ScrH() - 24, food * 2, 14, Color(21,153,0,180))
end )
-- Retirer le HUD de base sur GMOD
hook.Add( "HUDShouldDraw", "DefautHUD", function( name )
if ( name == "CHudHealth" or name == "CHudBattery" ) then
return false
end
end )
Photo de l’aperçu en jeux >
Pièces jointes
- Capture.PNG29.6 KB Vues: 5