Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. include("chroma_hud_config.lua") ---- Inclus le fichier config KV1 = Variable VIE, KA1= Variable Armure
  2.  
  3. hook.Add("HUDPaint", "Khud", function()
  4.  
  5. local kv1 = LocalPlayer():Health()
  6.  
  7. if kv1 < 0 then
  8. kv1 = 0
  9. elseif kv1 > 100 then
  10. kv1 = 100
  11. end
  12.  
  13. local ka1 = LocalPlayer():Armor()
  14.  
  15. if ka1 < 0 then
  16. ka1 = 0
  17. elseif ka1 > 100 then
  18. ka1 = 100
  19. end
  20.  
  21. local kf1 = LocalPlayer():getDarkRPVar("Energy")
  22. local argent = LocalPlayer():getDarkRPVar("money")
  23. local salaire = LocalPlayer():getDarkRPVar("salary")
  24. local job = team.GetName(LocalPlayer():Team())
  25. local rpname = LocalPlayer():Name()
  26.  
  27. if BOX_Armure == true and BOX_KF1 and BOX_Health == true then
  28. draw.RoundedBox(8, 10, ScrH() - 20, kv1 * 6, 14,CONFIG.BOXKA1) ------- Explications le premier chiffre 8 c'est pour changer le "style" de la box le deuxième chiffre 10 permet d'ecarter la box du bord de l'écran plus le chiffre est elever plus la box s'éloigne vers la droite, le chiffre 20 sert a monter la box vers le haut, le chiffre 6 permet d'augmenter la taille de la box en longeur, le chiffre 14 augmente la taille de la box en largeur
  29. draw.RoundedBox(8, 10, ScrH() - 40, ka1 * 2, 14,CONFIG.BOXKA1)
  30. draw.RoundedBox(8, 10, ScrH() - 55, kf1 * 4, 14,CONFIG.BOXKF1)
  31. draw.SimpleText("Argent: "..money.." €", "KFONT", 57, ScrH() - 70, CONFIG.TEXTARGENT, TEXT_ALIGN_CENTER ) -- Explications pour DrawSimpleText cette fois , 57 plus le nombre sera grand plus il sera vers la droite plus le chiffre sera petit il sera vers la gauche,70 répresente la hauteur
  32. draw.SimpleText("Salaire: "..salaire, "KFONT", 70, ScrH() - 100, Color(255,255,255), TEXT_ALIGN_CENTER ) -- Le text de salaire pour l'afficher
  33. draw.SimpleText("Métier: "..job, "KFONT", 75, ScrH() -130, CONFIG.TEXTJOB, TEXT_ALIGN_CENTER)
  34. end
  35.  
  36. if BOX_Armure == false and BOX_KF1 and BOX_Health == true then
  37. draw.RoundedBox(8, 10, SrcH() - 20, kv1 * 6, 14,CONFIG.BOXKV1)
  38. draw.SimpleText("Argent: "..money.." €", "KFONT", 57, ScrH() - 70, CONFIG.TEXTARGENT, TEXT_ALIGN_CENTER )
  39. draw.SimpleText("Salaire: "..salaire, "KFONT", 70, ScrH() - 100, Color(255,255,255), TEXT_ALIGN_CENTER )
  40. draw.SimpleText("Métier: "..job, "KFONT", 75, ScrH() -130, CONFIF.TEXTJOB, TEXT_ALIGN_CENTER)
  41. end
  42.  
  43. if BOX_Armure == true and BOX_KF1 and BOX_Health == false then
  44. draw.RoundedBox(8, 10, ScrH() - 20, ka1 * 4, 14,CONFIG.BOXKA1)
  45. draw.SimpleText("Argent: "..money.." €", "KFONT", 60, ScrH() - 70, CONFIG.TEXTARGENT, TEXT_ALIGN_CENTER )
  46. draw.SimpleText("Salaire: "..salaire, "KFONT", 40, ScrH() - 100, Color(255,255,255), TEXT_ALIGN_CENTER )
  47. draw.SimpleText("Métier: "..job, "KFONT", 75, ScrH() -130, CONFIF.TEXTJOB, TEXT_ALIGN_CENTER)
  48. end
  49.  
  50. if BOX_Armure == false and BOX_KF1 and BOX_Health == false then
  51. draw.SimpleText("Argent: "..money.." €", "KFONT", 57, ScrH() - 70, CONFIG.TEXTARGENT, TEXT_ALIGN_CENTER )
  52. draw.SimpleText("Salaire: "..salaire, "KFONT", 70, ScrH() - 100, Color(255,255,255), TEXT_ALIGN_CENTER )
  53. draw.SimpleText("Métier: "..job, "KFONT", 75, ScrH() -130, CONFIF.TEXTJOB, TEXT_ALIGN_CENTER)
  54. end
  55. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement