Guest User

Untitled

a guest
Jan 3rd, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.74 KB | None | 0 0
  1. -- Spieler finden
  2.  
  3. -- Beim Start alles rendern
  4. addEventHandler("onClientRender",getRootElement(), function()
  5. localplayer = getLocalPlayer ( )
  6. -- Allgemeine Variabeln
  7.  
  8. if getElementHealth ( localplayer ) >= 1 then
  9. local leben = getElementHealth ( localplayer )
  10. local lunge = getPedOxygenLevel ( localplayer )
  11. local hungeranzeige = getElementHunger ( )
  12. local wantedsP = getElementData ( localPlayer, "wanteds" )
  13. local pgeld = mymoney
  14. local sx, sy = guiGetScreenSize()
  15. local px, py = 1920, 1080
  16. local x,y = (sx/px), (sy/py)
  17.  
  18. local stunde, minute = getTime()
  19.     if minute < 10 then minute = tostring("0"..minute) end
  20.     if stunde < 10 then stunde = tostring("0"..stunde) end
  21. clip = getPedAmmoInClip ( localplayer )
  22. ammo = getPedTotalAmmo ( localplayer )
  23. waffe = getPedWeapon ( localplayer )
  24. magazin = getPedAmmoInClip ( localplayer )
  25. namewap = getWeaponNameFromID ( waffe )
  26. local armor = getPedArmor ( localplayer )
  27.  
  28.     setPlayerHudComponentVisible("clock",false)
  29.     setPlayerHudComponentVisible("breath",false)
  30.     setPlayerHudComponentVisible("armour",false)
  31.     setPlayerHudComponentVisible("health",false)
  32.     setPlayerHudComponentVisible("money",false)
  33.     setPlayerHudComponentVisible("ammo",false)
  34.     setPlayerHudComponentVisible("weapon",false)
  35.     setPlayerHudComponentVisible("wanted",false)
  36.    
  37. -- HUD Basis
  38. --if sx == 1920 and sy == 1080 then
  39. dxDrawRectangle(x*1574, y*44, x*275, y*170, tocolor(1, 0, 0, 185), true)
  40.         dxDrawText("", x*1544+5, y*60+5, x*1726, y*80, tocolor(0, 0, 0, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  41.         dxDrawText("", x*1544+5, y*58+5, x*1726, y*78, tocolor(0, 0, 0, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  42.         dxDrawText("", x*1542+5, y*60+5, x*1724, y*80, tocolor(0, 0, 0, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  43.         dxDrawText("", x*1542+5, y*58+5, x*1724, y*78, tocolor(0, 0, 0, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  44.         dxDrawText("", x*1543+5, y*59+5, x*1725, y*79, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  45.        
  46.         dxDrawRectangle(x*1595, y*88, x*208+4, y*18+4, tocolor(0, 0, 0, 255), true)
  47.         dxDrawImage(x*1596+2, y*89+2, x*206, y*16, "images/hud/armourBG.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  48.        
  49.         dxDrawRectangle(x*1595, y*140, x*208+4, y*18+4, tocolor(0, 0, 0, 255), true)
  50.         dxDrawImage(x*1596+2, y*141+2, x*206, y*16, "images/hud/hungerBG.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  51.        
  52.         dxDrawRectangle(x*1595, y*114, x*208+4, y*18+5, tocolor(0, 0, 0, 255), true)
  53.         dxDrawImage(x*1596+2, y*115+2, x*206, y*16, "images/hud/healthBG.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  54.  
  55.         dxDrawImage(x*1812, y*89, x*16, y*16, "images/hud/armour.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  56.         dxDrawImage(x*1812, y*115, x*16, y*16, "images/hud/health.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  57.  
  58. dxDrawImage(x*1812, y*59+5, x*16, y*16, "images/hud/time.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  59.  
  60. dxDrawImage(x*1815, y*172.5+5, x*14, y*16, "images/hud/money.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  61. -- Geld Nullen
  62. local geldlaenge = string.len(pgeld)
  63. local targetlaenge = 8-tonumber(geldlaenge)
  64. local geldnullen = ""
  65. for i = 1, targetlaenge, 1 do
  66.     geldnullen = tostring(geldnullen.."0")
  67. end
  68. local geld = tostring(geldnullen..""..pgeld)
  69.  
  70. -- Geld Anzeige
  71.         dxDrawText("$"..geld, x*1516, y*158+10, x*1885, y*206, tocolor(0, 0, 0, 255), x*1.86, "pricedown", "center", "center", false, false, true, false, false)
  72.         dxDrawText("$"..geld, x*1516, y*156+10, x*1885, y*204, tocolor(0, 0, 0, 255), x*1.86, "pricedown", "center", "center", false, false, true, false, false)
  73.         dxDrawText("$"..geld, x*1514, y*158+10, x*1883, y*206, tocolor(0, 0, 0, 255), x*1.86, "pricedown", "center", "center", false, false, true, false, false)
  74.         dxDrawText("$"..geld, x*1514, y*156+10, x*1883, y*204, tocolor(0, 0, 0, 255), x*1.86, "pricedown", "center", "center", false, false, true, false, false)
  75.         dxDrawText("$"..geld, x*1515, y*157+10, x*1884, y*205, tocolor(228, 227, 227, 254), x*1.86, "pricedown", "center", "center", false, false, true, false, false)
  76.        
  77. -- Uhrzeit
  78.         dxDrawText(stunde..":"..minute, x*1770, y*60+5, x*1803, y*70, tocolor(0, 0, 0, 255), x*1.00, "default", "left", "top", false, false, true, false, false)
  79.         dxDrawText(stunde..":"..minute, x*1770, y*58+5, x*1803, y*68, tocolor(0, 0, 0, 255), x*1.00, "default", "left", "top", false, false, true, false, false)
  80.         dxDrawText(stunde..":"..minute, x*1768, y*60+5, x*1801, y*70, tocolor(0, 0, 0, 255), x*1.00, "default", "left", "top", false, false, true, false, false)
  81.         dxDrawText(stunde..":"..minute, x*1768, y*58+5, x*1801, y*68, tocolor(0, 0, 0, 255), x*1.00, "default", "left", "top", false, false, true, false, false)
  82.         dxDrawText(stunde..":"..minute, x*1769, y*59+5, x*1802, y*69, tocolor(255, 255, 255, 255), x*1.00, "default", "left", "top", false, false, true, false, false)
  83.        
  84.         -- Waffe
  85.         dxDrawImage(x*1482-10, y*44, x*82, y*87, tostring("images/weapons/"..waffe..".png"), 0, 0, 0, tocolor(255, 255, 255, 255), true)
  86.         --Munition
  87.         if waffe ~= 0 then
  88.             if waffe ~= 1 then
  89.                 if waffe ~= 2 then
  90.                     if waffe ~= 3 then
  91.                         if waffe ~= 4 then
  92.                             if waffe ~= 5 then
  93.                                 if waffe ~= 6 then
  94.                                     if waffe ~= 7 then
  95.                                         if waffe ~= 8 then  
  96.                                             if waffe ~= 9 then
  97.                                                 if waffe ~= 10 then
  98.                                                     if waffe ~= 11 then
  99.                                                         if waffe ~= 12 then
  100.                                                             if waffe ~= 14 then
  101.                                                                 if waffe ~= 15 then
  102.                                                                     if waffe ~= 40 then
  103.                                                                         if waffe ~= 46 then
  104.                                                                             if waffe ~= 44 then
  105.                                                                                 if waffe ~= 45 then
  106.                                                                                     dxDrawText(magazin.." / "..ammo-magazin, x*1488-20, y*122, x*1565, y*166, tocolor(0, 0, 0, 255), x*1.20, "pricedown", "center", "center", false, false, true, false, false)
  107.                                                                                     dxDrawText(magazin.." / "..ammo-magazin, x*1488-20, y*120, x*1565, y*164, tocolor(0, 0, 0, 255), x*1.20, "pricedown", "center", "center", false, false, true, false, false)
  108.                                                                                     dxDrawText(magazin.." / "..ammo-magazin, x*1486-20, y*122, x*1563, y*166, tocolor(0, 0, 0, 255), x*1.20, "pricedown", "center", "center", false, false, true, false, false)
  109.                                                                                     dxDrawText(magazin.." / "..ammo-magazin, x*1486-20, y*120, x*1563, y*164, tocolor(0, 0, 0, 255), x*1.20, "pricedown", "center", "center", false, false, true, false, false)
  110.                                                                                     dxDrawText(magazin.." / "..ammo-magazin, x*1487-20, y*121, x*1564, y*165, tocolor(228, 227, 227, 254), x*1.20, "pricedown", "center", "center", false, false, true, false, false)
  111.                                                                                 end
  112.                                                                             end
  113.                                                                         end
  114.                                                                     end
  115.                                                                 end
  116.                                                             end
  117.                                                         end
  118.                                                     end
  119.                                                 end
  120.                                             end
  121.                                         end
  122.                                     end
  123.                                 end
  124.                             end
  125.                         end
  126.                     end
  127.                 end
  128.             end
  129.         end
  130. -- Leben
  131. dxDrawRectangle(x*1596+2, y*115+2, x*206/100*leben, y*8, tocolor(75, 176, 0, 255), true)
  132. dxDrawRectangle(x*1596+2, y*115+10, x*206/100*leben, y*8, tocolor(58, 143, 0, 255), true)
  133. --dxDrawImage(x*1596+2, y*115+2, x*206/100*leben, y*16, "images/hud/healthbar.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  134.  
  135. -- Weste
  136. dxDrawRectangle(x*1596+2, y*89+2, x*206/100*armor, y*8, tocolor(10, 156, 183, 255), true)
  137. dxDrawRectangle(x*1596+2, y*89+10, x*206/100*armor, y*8, tocolor(8, 121, 153, 255), true)
  138. --dxDrawImage(x*1596+2, y*89+2, x*206/100*armor, y*16, "images/hud/armourbar.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  139.  
  140. -- Hunger
  141. dxDrawRectangle(x*1596+2, y*141+2, x*206/100*hungeranzeige, y*8, tocolor(226, 199, 0, 255), true)
  142. dxDrawRectangle(x*1596+2, y*141+10, x*206/100*hungeranzeige, y*8, tocolor(214, 176, 0, 255), true)
  143. --dxDrawImage(x*1596+2, y*141+2, x*206/100*hungeranzeige, y*16, "images/hud/hungerbar.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  144.  
  145. -- Lunge
  146. if isElementInWater(localplayer) and lunge <= 1000 then
  147.     dxDrawRectangle(x*1595, y*140, x*208+4, y*18+4, tocolor(0, 0, 0, 255), true)
  148.     dxDrawImage(x*1596+2, y*141+2, x*206, y*16,"images/hud/lungenBG.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  149.     hungericon = dxDrawImage(x*1812, y*141, x*16, y*16, "images/hud/air.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  150.     if lunge <= 1000 then
  151.     dxDrawRectangle(x*1596+2, y*141+2, x*206/1000*lunge, y*8, tocolor(255, 115, 0, 255), true)
  152.     dxDrawRectangle(x*1596+2, y*141+10, x*206/1000*lunge, y*8, tocolor(255, 96, 0, 255), true)
  153.     --dxDrawImage(x*1596+2, y*141+2, x*206/1000*lunge, y*16, "images/hud/lungenbar.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  154.     else
  155.     dxDrawRectangle(x*1596+2, y*141+2, x*206/1000*lunge, y*8, tocolor(255, 115, 0, 255), true)
  156.     dxDrawRectangle(x*1596+2, y*141+10, x*206/1000*lunge, y*8, tocolor(255, 96, 0, 255), true)
  157.     --dxDrawImage(x*1596+2, y*141+2, x*206/1000*lunge, y*16, "images/hud/lungenbar.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  158.     end
  159. else
  160.     hungericon = dxDrawImage(x*1812, y*141, x*16, y*16, "images/hud/hunger.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  161. end
  162. -- Wanteds
  163.     if wantedsP == 1 then
  164.         wantedP1 = dxDrawImage(x*1809, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  165.         wantedP2 = dxDrawImage(x*1762, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  166.         wantedP3 = dxDrawImage(x*1715, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  167.         wantedP4 = dxDrawImage(x*1668, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  168.         wantedP5 = dxDrawImage(x*1621, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  169.         wantedP6 = dxDrawImage(x*1574, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  170.     elseif wantedsP == 2 then
  171.         wantedP1 = dxDrawImage(x*1809, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  172.         wantedP2 = dxDrawImage(x*1762, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  173.         wantedP3 = dxDrawImage(x*1715, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  174.         wantedP4 = dxDrawImage(x*1668, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  175.         wantedP5 = dxDrawImage(x*1621, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  176.         wantedP6 = dxDrawImage(x*1574, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  177.     elseif wantedsP == 3 then
  178.         wantedP1 = dxDrawImage(x*1809, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  179.         wantedP2 = dxDrawImage(x*1762, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  180.         wantedP3 = dxDrawImage(x*1715, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  181.         wantedP4 = dxDrawImage(x*1668, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  182.         wantedP5 = dxDrawImage(x*1621, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  183.         wantedP6 = dxDrawImage(x*1574, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  184.     elseif wantedsP == 4 then
  185.         wantedP1 = dxDrawImage(x*1809, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  186.         wantedP2 = dxDrawImage(x*1762, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  187.         wantedP3 = dxDrawImage(x*1715, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  188.         wantedP4 = dxDrawImage(x*1668, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  189.         wantedP5 = dxDrawImage(x*1621, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  190.         wantedP6 = dxDrawImage(x*1574, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  191.     elseif wantedsP == 5 then
  192.         wantedP1 = dxDrawImage(x*1809, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  193.         wantedP2 = dxDrawImage(x*1762, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  194.         wantedP3 = dxDrawImage(x*1715, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  195.         wantedP4 = dxDrawImage(x*1668, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  196.         wantedP5 = dxDrawImage(x*1621, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  197.         wantedP6 = dxDrawImage(x*1574, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  198.     elseif wantedsP == 6 then
  199.         wantedP1 = dxDrawImage(x*1809, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  200.         wantedP2 = dxDrawImage(x*1762, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  201.         wantedP3 = dxDrawImage(x*1715, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  202.         wantedP4 = dxDrawImage(x*1668, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  203.         wantedP5 = dxDrawImage(x*1621, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  204.         wantedP6 = dxDrawImage(x*1574, y*219, x*30, y*30, "images/hud/wanted_active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  205.     else
  206.         wantedP1 = dxDrawImage(x*1809, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  207.         wantedP2 = dxDrawImage(x*1762, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  208.         wantedP3 = dxDrawImage(x*1715, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  209.         wantedP4 = dxDrawImage(x*1668, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  210.         wantedP5 = dxDrawImage(x*1621, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  211.         wantedP6 = dxDrawImage(x*1574, y*219, x*30, y*30, "images/hud/wanted_inactive.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  212.     end
  213. -- Prozentzahlen
  214.         --dxDrawText(round(armor).."%", x*1596, y*90+2, x*1803, y*106, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  215.        -- dxDrawText(round(armor).."%", x*1596, y*88+2, x*1803, y*104, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  216.         --dxDrawText(round(armor).."%", x*1594, y*90+2, x*1801, y*106, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  217.        -- dxDrawText(round(armor).."%", x*1594, y*88+2, x*1801, y*104, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  218.         dxDrawText(round(armor).."%", x*1595, y*89+5, x*1802, y*105, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  219.         --dxDrawText(round(leben).."%", x*1596, y*115+3, x*1803, y*131, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  220.        -- dxDrawText(round(leben).."%", x*1596, y*113+3, x*1803, y*129, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  221.         --dxDrawText(round(leben).."%", x*1594, y*115+3, x*1801, y*131, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  222.       --  dxDrawText(round(leben).."%", x*1594, y*113+3, x*1801, y*129, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  223.         dxDrawText(round(leben).."%", x*1595, y*114+8, x*1802, y*130, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  224. -- Hunger / Lunge Wechsel
  225. lungeP = round ( lunge / 10 )
  226. if isElementInWater(localplayer) and lungeP <= 100 then
  227.         hungericon = dxDrawImage(x*1812, y*141, x*16, y*16+2, "images/hud/air.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  228.         --prozent1 = dxDrawText(round(lunge).."%", x*1596, y*142+2, x*1803, y*158, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  229.         --prozent2 = dxDrawText(round(lunge).."%", x*1596, y*140+2, x*1803, y*156, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  230.         --prozent3 = dxDrawText(round(lunge).."%", x*1594, y*142+2, x*1801, y*158, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  231.         --prozent4 = dxDrawText(round(lunge).."%", x*1594, y*140+2, x*1801, y*156, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  232.         prozent5 = dxDrawText(lungeP.."%", x*1595, y*141+5, x*1802, y*157, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  233.         else
  234.         hungericon = dxDrawImage(x*1812, y*141+2, x*16, y*16, "images/hud/hunger.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  235.         --prozent1 = dxDrawText(round(hungeranzeige).."%", x*1596, y*142+2, x*1803, y*158, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  236.         --prozent2 = dxDrawText(round(hungeranzeige).."%", x*1596, y*140+2, x*1803, y*156, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  237.         --prozent3 = dxDrawText(round(hungeranzeige).."%", x*1594, y*142+2, x*1801, y*158, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  238.         --prozent4 = dxDrawText(round(hungeranzeige).."%", x*1594, y*140+2, x*1801, y*156, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, false, true, false, false)
  239.         prozent5 = dxDrawText(round(hungeranzeige).."%", x*1595, y*141+5, x*1802, y*157, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "center", "center", false, false, true, false, false)
  240.         end
  241. --else
  242. --end
  243. isHudEnabled = false
  244. addCommandHandler("customhud", function()
  245. if not isHudEnabled then
  246. isHudEnabled = true
  247. addEventHandler("onClientRender", root, createCustomHud)
  248.  
  249.     setPlayerHudComponentVisible("clock",false)
  250.     setPlayerHudComponentVisible("breath",false)
  251.     setPlayerHudComponentVisible("armour",false)
  252.     setPlayerHudComponentVisible("health",false)
  253.     setPlayerHudComponentVisible("money",false)
  254.     setPlayerHudComponentVisible("ammo",false)
  255.     setPlayerHudComponentVisible("weapon",false)
  256.     setPlayerHudComponentVisible("wanted",false)
  257.  
  258. else
  259. isHudEnabled = false
  260. removeEventHandler("onClientRender", root, onClientRender)
  261.    
  262.     setPlayerHudComponentVisible("clock",true)
  263.     setPlayerHudComponentVisible("breath",true)
  264.     setPlayerHudComponentVisible("armour",true)
  265.     setPlayerHudComponentVisible("health",true)
  266.     setPlayerHudComponentVisible("money",true)
  267.     setPlayerHudComponentVisible("ammo",true)
  268.     setPlayerHudComponentVisible("weapon",true)
  269.     setPlayerHudComponentVisible("wanted",true)
  270.    
  271. end
  272. end)
  273. end
  274. end
  275. )
Add Comment
Please, Sign In to add comment