Problème lua

  • Initiateur de la discussion Yanis Warlock
  • Date de début
  • Initiateur de la discussion
Yanis Warlock

Yanis Warlock

Geek
Messages
48
Score réaction
2
Points
45
Bonjour,

j'ai cette erreur ( https://pastebin.com/AxmscrzM ) dans ma console mais je ne sais pas comment la résoudre.
je crois que sa vien de mon hud ( https://pastebin.com/KRzN1aGc )

Merci de votre aide =)
 
L

lenny geek

Nouveau né
Messages
13
Score réaction
0
Points
15
sa vient de ton hud réinstalle le
 
  • Initiateur de la discussion
Yanis Warlock

Yanis Warlock

Geek
Messages
48
Score réaction
2
Points
45
s'est fait et refait sa ne marche toujours pas
 
L

lenny geek

Nouveau né
Messages
13
Score réaction
0
Points
15
Code:
-- HUD by Reijin
surface.CreateFont( "Reijin_Font32", { font = "TargetID", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name extended = false, size = 32, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = true, outline = false,
} )
surface.CreateFont( "Reijin_Font22", { font = "TargetID", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name extended = false, size = 22, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = true, outline = false,
} )
surface.CreateFont( "Reijin_Font20", { font = "TargetIDSmall", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name extended = false, size = 20, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = true, outline = false,
} )
surface.CreateFont( "Reijin_Font19", { font = "CloseCaption_Normal ", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name extended = false, size = 17, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = true, outline = false,
} )
-- Config --
local tserver = "RealityLife RP"
local tmoney = "€"
hook.Add( "HUDPaint", "HUDHealth", function() draw.RoundedBox( 0, 10, ScrH() -160, 300, 150, Color(0, 0, 0, 200)) -- Background draw.RoundedBox( 0, 15, ScrH() -155, 300 - 10, 140, Color(0, 0, 0, 150)) -- Background pour le tour draw.RoundedBox( 0, 20, ScrH() -150, 120, 130, Color(0, 0, 0, 150)) -- Fond du player model draw.RoundedBox( 0, 145, ScrH() -147.5, 1, 125, Color(255, 255, 255, 255)) -- Ligne Blanche a gauche draw.SimpleText(tserver, "Reijin_Font22", 225, ScrH() -150, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER ) -- Texte nom du serveur draw.RoundedBox( 0, 160, ScrH() -125, 130, 1, Color(255, 255, 255, 255)) -- Ligne en dessous du texte nom du serveur
local name = LocalPlayer():Name() draw.SimpleText(name, "Reijin_Font20", 155, ScrH() -120, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT)
local salary = LocalPlayer():getDarkRPVar("salary")
local money = LocalPlayer():getDarkRPVar("money") draw.SimpleText(money..tmoney.." ("..salary..tmoney..") ", "Reijin_Font20", 155, ScrH() -100, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT)
local health = LocalPlayer():Health() if health < 0 then health = 0 elseif health > 100 then health = 100 end draw.RoundedBox( 0, 155-2, ScrH() -75 -2, 144, 17, Color(0, 0, 0, 150)) -- Box du contour de la vie draw.RoundedBox( 0, 155, ScrH() -75, health *1.4, 13, Color(255, 0, 0, 200)) -- box de vie draw.SimpleText(health, "Reijin_Font19", 158, ScrH() -78, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT) -- Texte de la santer
local armor = LocalPlayer():Armor() if armor < 0 then armor = 0 elseif armor > 100 then armor = 100 end draw.RoundedBox( 0, 155-2, ScrH() -55 -2, 144, 17, Color(0, 0, 0, 150)) -- Box contour de l'armure draw.RoundedBox( 0, 155, ScrH() -55, armor *1.4, 13, Color(0, 66, 198, 220)) -- box d'armure draw.SimpleText( armor, "Reijin_Font19", 158, ScrH() -58, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT) -- texte de l'armure
local hunger = math.ceil(LocalPlayer():getDarkRPVar("Energy") or 0) if hunger < 0 then hunger = 0 elseif hunger > 100 then hunger = 100 end draw.RoundedBox( 0, 155-2, ScrH() -35 -2, 144, 17, Color(0, 0, 0, 150)) -- box contour de la faim draw.RoundedBox( 0, 155, ScrH() -35, hunger *1.4, 13, Color(255, 201, 0, 47)) -- box de la faim draw.SimpleText( hunger, "Reijin_Font19", 158, ScrH() -38, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT) -- texte de la faim
end) -- Licence d'arme / Avis de recherche
hook.Add( "HUDPaint", "HUDIcon", function()
local Ilicence = "icon16/page_red.png"
local Irecherche = "icon16/exclamation.png" if LocalPlayer():getDarkRPVar("HasGunlicense") then surface.SetDrawColor(255,255,255,255) else surface.SetDrawColor(25,25,25,255)
end surface.SetMaterial(Material(Ilicence)) surface.DrawTexturedRect( 25, ScrH() -145, 15, 15) if LocalPlayer():getDarkRPVar("wanted") then surface.SetDrawColor(255,255,255,255) else surface.SetDrawColor(25,25,25,255)
end surface.SetMaterial(Material(Irecherche)) surface.DrawTexturedRect( 120, ScrH() -145, 15, 15)
end)
hook.Add("HUDPaint", "HUDAmmo", function ()
if LocalPlayer():GetActiveWeapon() != NULL then local ammoinclip local extraammo local ammoinclip2 local extraammo2 if LocalPlayer():GetActiveWeapon():Clip1() < 0 then ammoinclip = "" -- Si les mun sont infinie extraammo = "" ammoinclip2 = "" extraammo2 = "" elseif LocalPlayer():GetActiveWeapon():Clip1() > -1 then ammoinclip = LocalPlayer():GetActiveWeapon():Clip1() extraammo = LocalPlayer():GetAmmoCount( LocalPlayer():GetActiveWeapon():GetPrimaryAmmoType() ) -- Affiche chargeur ammoinclip2 = LocalPlayer():GetActiveWeapon():Clip2() -- Afficher le reste mun extraammo2 = LocalPlayer():GetAmmoCount( LocalPlayer():GetActiveWeapon():GetSecondaryAmmoType() ) draw.RoundedBox(0, ScrW() -160, ScrH()-60, 150, 50, Color(0,0,0, 150)) -- Affiche box munitions draw.RoundedBox(0, ScrW() -160-5, ScrH()-60 -5, 160, 60, Color(0,0,0, 150)) -- Affiche contour box munitions draw.RoundedBox(0, ScrW() -80, ScrH()-60, 1, 50, Color(255,255,255, 150)) -- Affiche la separation end draw.DrawText( ammoinclip ,"Reijin_Font32", ScrW() -125, ScrH() -52, Color( 255, 255, 255), TEXT_ALIGN_CENTER ) -- Affiche le nombre de munitions draw.DrawText( extraammo , "Reijin_Font32", ScrW() -45, ScrH() -52, Color( 255, 255, 255), TEXT_ALIGN_CENTER) -- Affiche le nombre dans le chargeur else draw.DrawText( "Vous êtes mort!" ,"Reijin_Font32", ScrW() - 750, ScrH() - 450, Color( 255,255,255 )) -- Affiche vous etes mort au milieu de l'ecran end
end)
-- AGENDA -- local agendaText
local function DrawAgenda() -- Variables local agenda = LocalPlayer():getAgendaTable() if not agenda then return end -- Texte agendaText = agendaText or DarkRP.textWrap( ( LocalPlayer():getDarkRPVar( "agenda" ) or "" ):gsub( "//", "\n" ):gsub( "\\n", "\n" ), "Reijin_Font20", 440 ) -- Background draw.RoundedBox( 0, 10, 10, 460, 110, Color( 0, 0, 0, 150 )) draw.RoundedBox( 0, 10-5, 10-5, 470, 120, Color(0, 0, 0, 150)) -- Titre draw.RoundedBox( 0, 10, 10, 460, 30, Color(0,0,0, 150 )) -- Box du titre draw.DrawText( agenda.Title, "Reijin_Font22", 180, 13, Color( 225,225,225, 255 )) -- Titre de l'agenda draw.DrawText( agendaText, "Reijin_Font20", 15, 40, Color(255,255,255, 255)) --Texte de l'Agenda
end
hook.Add( "HUDPaint", "DrawAgenda", DrawAgenda )
hook.Add( "DarkRPVarChanged", "AgendaUpdate", function( ply, var, _, new ) --> Check if ply != LocalPlayer() then return end --> Agenda Update if var == "agenda" and new then agendaText = DarkRP.textWrap( new:gsub( "//", "\n" ):gsub( "\\n", "\n" ), "Reijin_Font20", 440 ) else agendaText = nil end
end )
-- Player Model
hook.Add( "InitPostEntity", "show", function() local show = vgui.Create("DModelPanel") show:SetPos(10 , ScrH() - 150) show:SetSize(150, 130) show:SetModel(LocalPlayer():GetModel()) show:SetCamPos(Vector(30, -15, 60)) show:SetFOV(55) show:SetLookAt(Vector(0, 0, 60)) show.Think = function() if not LocalPlayer():Alive() then show:SetSize(0, 0) else show:SetSize(150, 130) end show:SetModel(LocalPlayer():GetModel()) end show.LayoutEntity = function() return false end
end)
local ListeElements = { ["DarkRP_HUD"] = false, ["DarkRP_EntityDisplay"] = false, ["DarkRP_ZombieInfo"] = true, ["DarkRP_LocalPlayerHUD"] = true, ["DarkRP_Hungermod"] = true, ["DarkRP_Agenda"] = true, ["DarkRP_LockdownHUD"] = false, ["DarkRP_ArrestedHUD"] = false, ["CHudHealth"] = true, ["CHudBattery"] = true, ["CHudSuitPower"] = true, ["CHudAmmo"] = true, ["CHudSecondaryAmmo"] = true,
}
local function cacherElements(element) if ListeElements[element] then return false end
end
hook.Add("HUDShouldDraw", "cacherElements", cacherElements)
 
Viktor

Viktor

Geek
Messages
144
Score réaction
25
Points
80
Enleve .. avant salary
 
  • J'aime
Réactions: Yanis Warlock
  • Initiateur de la discussion
Yanis Warlock

Yanis Warlock

Geek
Messages
48
Score réaction
2
Points
45
Viktor

Viktor

Geek
Messages
144
Score réaction
25
Points
80
  • Initiateur de la discussion
Yanis Warlock

Yanis Warlock

Geek
Messages
48
Score réaction
2
Points
45
l'erreur se fait toujours
 
Viktor

Viktor

Geek
Messages
144
Score réaction
25
Points
80
Remplace par sa

Code:
 draw.SimpleText(money..tmoney.." ("..salary.. .. tmoney..") ", "Reijin_Font20", 155, ScrH() -100, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT)
Je comprend rien à ce foutu bordel , tous est mal aligné et mal ranger :/
 
  • Initiateur de la discussion
Yanis Warlock

Yanis Warlock

Geek
Messages
48
Score réaction
2
Points
45
je en peut rien. j'éspere reçevoir un peut plus de réponse
 
Discord d'entraide
Rejoignz-nous sur Discord