22 Haziran 2018, 13:38:53

Gönderen Konu: [YARDIM] HUD Scriptinde Can Barı Taşıyor  (Okunma sayısı 458 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

fgamerr

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 17
[YARDIM] HUD Scriptinde Can Barı Taşıyor
« : 24 Mayıs 2017, 22:58:37 »
Nasıl ayarlayabilirim arkadaşlar?

Kod: Lua
  1. function tik()
  2. local sx,sy = guiGetScreenSize()
  3. local px,py = 1600,900
  4. local x,y =  (sx/px), (sy/py)          
  5. local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "radio", "vehicle_name" }
  6.  
  7. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
  8. function ()
  9.         for _, component in ipairs( components ) do
  10.                 setPlayerHudComponentVisible( component, false )
  11.         end
  12. end)
  13.  
  14. addEventHandler("onClientRender", root,
  15.   function()
  16.     local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
  17.     local ammo1 = getPedTotalAmmo (localPlayer,getPedWeaponSlot(localPlayer))
  18.     local armaID = getPedWeapon(localPlayer)
  19.     local Money = getPlayerMoney ( getLocalPlayer() )
  20.         local altura = 28
  21.     local imageL, imageA = 25,25
  22.     local image = "star.png"
  23.     vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
  24.  
  25.         oxigenio= getPedOxygenLevel ( getLocalPlayer() )
  26.         stat = getPedStat ( getLocalPlayer(), 24 )
  27.         showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
  28.         showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)
  29.         showammo3 = getPedTotalAmmo(getLocalPlayer())
  30.         wanted = getPlayerWantedLevel (getLocalPlayer())
  31.        
  32.         if oxigenio < 1000 or isElementInWater (getLocalPlayer()) then
  33.         dxDrawRectangle(x*1386, y*120, x*149/1000*oxigenio, y*11, tocolor(255, 127,0), false)
  34.         dxDrawEmptyRec(x*1386, y*120, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--BarrinhaOxigenio
  35.         end
  36.         if stat < 1000 then
  37.         dxDrawRectangle(x*1386, y*84, x*149/100*vida, y*11, tocolor(244, 36, 0), false)
  38.         else
  39.         dxDrawRectangle(x*1386, y*84, x*149/200*vida, y*11, tocolor(0, 0, 0, 180), false)
  40.         end
  41.  
  42.     local armour = getPedArmor ( getLocalPlayer() )
  43.         dxDrawRectangle(x*1386, y*102, x*149, y*11, tocolor(0, 0, 0, 180), false)--fundo
  44.         if armour>0 then
  45.         dxDrawRectangle(x*1386, y*102, x*149/100*armour, y*11, tocolor(41, 134, 199, 255), false)
  46.         end
  47.         dxDrawEmptyRec(x*1386, y*84, x*149, y*11,  tocolor(0, 0, 0, 255), 1) --Can
  48.         dxDrawEmptyRec(x*1386, y*102, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--Çelik Yelek
  49.     dxDrawBorderedText(ammo1.." | "..ammo, x*1390, y*250, x*1513, y*120, tocolor(255, 255, 255, 255), 1.0, "default-bold", "center", "center", false, false, true, false, false)
  50.     dxDrawBorderedText(("%09d"):format(getPlayerMoney(localPlayer)).."$", x*1410, y*15, x*1510, y*120, tocolor(4, 122, 24), 1.0, "pricedown","center","center",false, false,true, false, false)
  51.        
  52.  
  53.  
  54.     weapon = getPedWeapon ( getLocalPlayer() )
  55.     if ( weapon == 0 ) then
  56.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/0.png" )
  57.     end
  58.  
  59.     if ( weapon == 1 ) then
  60.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/1.png" )
  61.     end
  62.  
  63.     if ( weapon == 2 ) then
  64.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/2.png" )
  65.     end
  66.  
  67.     if ( weapon == 3 ) then
  68.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/3.png" )
  69.     end
  70.  
  71.     if ( weapon == 4 ) then
  72.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/4.png" )
  73.     end
  74.  
  75.     if ( weapon == 5 ) then
  76.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/5.png" )
  77.     end
  78.  
  79.     if ( weapon == 6 ) then
  80.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/6.png" )
  81.     end
  82.  
  83.     if ( weapon == 7 ) then
  84.         dxDrawImage ( xx*1375, y*110, x*160, y*90, "img/7.png" )
  85.     end
  86.  
  87.     if ( weapon == 8 ) then
  88.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/8.png" )
  89.     end
  90.  
  91.     if ( weapon == 9 ) then
  92.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/9.png" )
  93.     end
  94.  
  95.     if ( weapon == 10 ) then
  96.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/10.png" )
  97.     end
  98.  
  99.     if ( weapon == 11 ) then
  100.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/11.png" )
  101.     end
  102.  
  103.     if ( weapon == 12 ) then
  104.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/12.png" )
  105.     end
  106.  
  107.     if ( weapon == 14 ) then
  108.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/14.png" )
  109.     end
  110.  
  111.     if ( weapon == 15 ) then
  112.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/15.png" )
  113.     end
  114.  
  115.     if ( weapon == 16 ) then
  116.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/16.png" )
  117.     end
  118.  
  119.     if ( weapon == 17 ) then
  120.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/17.png" )
  121.     end
  122.  
  123.     if ( weapon == 18 ) then
  124.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/18.png" )
  125.     end
  126.  
  127.     if ( weapon == 22 ) then
  128.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/22.png" )
  129.     end
  130.  
  131.     if ( weapon == 23 ) then
  132.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/23.png" )
  133.     end
  134.  
  135.     if ( weapon == 24 ) then
  136.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/24.png" )
  137.     end
  138.  
  139.     if ( weapon == 25 ) then
  140.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/25.png" )
  141.     end
  142.  
  143.     if ( weapon == 26 ) then
  144.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/26.png" )
  145.     end
  146.  
  147.     if ( weapon == 27 ) then
  148.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/27.png" )
  149.     end
  150.  
  151.     if ( weapon == 28 ) then
  152.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/28.png" )
  153.     end
  154.  
  155.     if ( weapon == 29 ) then
  156.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/29.png" )
  157.     end
  158.  
  159.     if ( weapon == 30 ) then
  160.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/30.png" )
  161.     end
  162.  
  163.     if ( weapon == 31 ) then
  164.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/31.png" )
  165.     end
  166.  
  167.     if ( weapon == 32 ) then
  168.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/32.png" )
  169.     end
  170.  
  171.     if ( weapon == 33 ) then
  172.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/33.png" )
  173.     end
  174.  
  175.     if ( weapon == 34 ) then
  176.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/34.png" )
  177.     end
  178.    
  179.     if ( weapon == 35 ) then
  180.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/35.png" )
  181.     end
  182.  
  183.     if ( weapon == 36 ) then
  184.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/36.png" )
  185.     end
  186.  
  187.     if ( weapon == 37 ) then
  188.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/37.png" )
  189.     end
  190.  
  191.     if ( weapon == 38 ) then
  192.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/38.png" )
  193.     end
  194.  
  195.     if ( weapon == 39 ) then
  196.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/39.png" )
  197.     end
  198.  
  199.     if ( weapon == 40 ) then
  200.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/40.png" )
  201.     end
  202.  
  203.     if ( weapon == 41 ) then
  204.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/41.png" )
  205.     end
  206.  
  207.     if ( weapon == 42 ) then
  208.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/42.png" )
  209.     end
  210.  
  211.     if ( weapon == 43 ) then
  212.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/43.png" )
  213.     end
  214.  
  215.     if ( weapon == 44 ) then
  216.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/44.png" )
  217.     end
  218.  
  219.     if ( weapon == 45 ) then
  220.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/45.png" )
  221.     end
  222.  
  223.     if ( weapon == 46 ) then
  224.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/46.png" )
  225.     end
  226.     end
  227. )
  228.  
  229. function dxDrawEmptyRec(absX, absY, sizeX, sizeY, color, ancho)
  230.         dxDrawRectangle(absX, absY, sizeX, ancho, color)
  231.         dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color)
  232.         dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color)
  233.         dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho * 2, color)
  234. end
  235.  
  236. function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
  237.         dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  238.         dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  239.         dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  240.         dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  241.         dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  242.         dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  243.         dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  244.         dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  245.         dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
  246. end


Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın

« Son Düzenleme: 25 Mayıs 2017, 21:50:08 Gönderen: Narkoz »
 

MTASA-TURK | Türkiye'nin En Güncel MTA Platformu

[YARDIM] HUD Scriptinde Can Barı Taşıyor
« : 24 Mayıs 2017, 22:58:37 »

Rambo

  • Ramazan Sert
  • Acemi Üye
  • *
  • İleti: 189
  • Cesareti İle Yaşamayan Esareti İle Ölür
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #1 : 24 Mayıs 2017, 23:10:36 »
Adam yazarken yanlış yapmış Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın a mesaj gönder özelden yardım edebilir
 

Paradox

  • Kurucu
  • *
  • İleti: 640
  • SH Gaming
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #2 : 24 Mayıs 2017, 23:11:29 »
Kod: Lua
  1. function tik()
  2. local sx,sy = guiGetScreenSize()
  3. local px,py = 1600,900
  4. local x,y =  (sx/px), (sy/py)          
  5. local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "radio", "vehicle_name" }
  6.  
  7. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
  8. function ()
  9.         for _, component in ipairs( components ) do
  10.                 setPlayerHudComponentVisible( component, false )
  11.         end
  12. end)
  13.  
  14. addEventHandler("onClientRender", root,
  15.   function()
  16.     local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
  17.     local ammo1 = getPedTotalAmmo (localPlayer,getPedWeaponSlot(localPlayer))
  18.     local armaID = getPedWeapon(localPlayer)
  19.     local Money = getPlayerMoney ( getLocalPlayer() )
  20.         local altura = 28
  21.     local imageL, imageA = 25,25
  22.     local image = "star.png"
  23.     vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
  24.  
  25.         oxigenio= getPedOxygenLevel ( getLocalPlayer() )
  26.         stat = getPedStat ( getLocalPlayer(), 24 )
  27.         showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
  28.         showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)
  29.         showammo3 = getPedTotalAmmo(getLocalPlayer())
  30.         wanted = getPlayerWantedLevel (getLocalPlayer())
  31.        
  32.         if oxigenio < 1000 or isElementInWater (getLocalPlayer()) then
  33.         dxDrawRectangle(x*1386, y*120, x*149/1000*oxigenio, y*11, tocolor(255, 127,0), false)
  34.         dxDrawEmptyRec(x*1386, y*120, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--BarrinhaOxigenio
  35.         end
  36.         if stat == 1000 then
  37.         dxDrawRectangle(x*1386, y*84, x*149/200*vida, y*11, tocolor(244, 36, 0), false)
  38.         else
  39.         dxDrawRectangle(x*1386, y*84, (x*149/(100 + (stat - 569) / 4.31))*vida, y*11, tocolor(0, 0, 0, 180), false)
  40.         end
  41.  
  42.     local armour = getPedArmor ( getLocalPlayer() )
  43.         dxDrawRectangle(x*1386, y*102, x*149, y*11, tocolor(0, 0, 0, 180), false)--fundo
  44.         if armour>0 then
  45.         dxDrawRectangle(x*1386, y*102, x*149/100*armour, y*11, tocolor(41, 134, 199, 255), false)
  46.         end
  47.         dxDrawEmptyRec(x*1386, y*84, x*149, y*11,  tocolor(0, 0, 0, 255), 1) --Can
  48.         dxDrawEmptyRec(x*1386, y*102, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--Çelik Yelek
  49.     dxDrawBorderedText(ammo1.." | "..ammo, x*1390, y*250, x*1513, y*120, tocolor(255, 255, 255, 255), 1.0, "default-bold", "center", "center", false, false, true, false, false)
  50.     dxDrawBorderedText(("%09d"):format(getPlayerMoney(localPlayer)).."$", x*1410, y*15, x*1510, y*120, tocolor(4, 122, 24), 1.0, "pricedown","center","center",false, false,true, false, false)
  51.        
  52.  
  53.  
  54.     weapon = getPedWeapon ( getLocalPlayer() )
  55.     if ( weapon == 0 ) then
  56.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/0.png" )
  57.     end
  58.  
  59.     if ( weapon == 1 ) then
  60.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/1.png" )
  61.     end
  62.  
  63.     if ( weapon == 2 ) then
  64.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/2.png" )
  65.     end
  66.  
  67.     if ( weapon == 3 ) then
  68.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/3.png" )
  69.     end
  70.  
  71.     if ( weapon == 4 ) then
  72.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/4.png" )
  73.     end
  74.  
  75.     if ( weapon == 5 ) then
  76.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/5.png" )
  77.     end
  78.  
  79.     if ( weapon == 6 ) then
  80.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/6.png" )
  81.     end
  82.  
  83.     if ( weapon == 7 ) then
  84.         dxDrawImage ( xx*1375, y*110, x*160, y*90, "img/7.png" )
  85.     end
  86.  
  87.     if ( weapon == 8 ) then
  88.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/8.png" )
  89.     end
  90.  
  91.     if ( weapon == 9 ) then
  92.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/9.png" )
  93.     end
  94.  
  95.     if ( weapon == 10 ) then
  96.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/10.png" )
  97.     end
  98.  
  99.     if ( weapon == 11 ) then
  100.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/11.png" )
  101.     end
  102.  
  103.     if ( weapon == 12 ) then
  104.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/12.png" )
  105.     end
  106.  
  107.     if ( weapon == 14 ) then
  108.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/14.png" )
  109.     end
  110.  
  111.     if ( weapon == 15 ) then
  112.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/15.png" )
  113.     end
  114.  
  115.     if ( weapon == 16 ) then
  116.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/16.png" )
  117.     end
  118.  
  119.     if ( weapon == 17 ) then
  120.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/17.png" )
  121.     end
  122.  
  123.     if ( weapon == 18 ) then
  124.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/18.png" )
  125.     end
  126.  
  127.     if ( weapon == 22 ) then
  128.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/22.png" )
  129.     end
  130.  
  131.     if ( weapon == 23 ) then
  132.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/23.png" )
  133.     end
  134.  
  135.     if ( weapon == 24 ) then
  136.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/24.png" )
  137.     end
  138.  
  139.     if ( weapon == 25 ) then
  140.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/25.png" )
  141.     end
  142.  
  143.     if ( weapon == 26 ) then
  144.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/26.png" )
  145.     end
  146.  
  147.     if ( weapon == 27 ) then
  148.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/27.png" )
  149.     end
  150.  
  151.     if ( weapon == 28 ) then
  152.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/28.png" )
  153.     end
  154.  
  155.     if ( weapon == 29 ) then
  156.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/29.png" )
  157.     end
  158.  
  159.     if ( weapon == 30 ) then
  160.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/30.png" )
  161.     end
  162.  
  163.     if ( weapon == 31 ) then
  164.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/31.png" )
  165.     end
  166.  
  167.     if ( weapon == 32 ) then
  168.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/32.png" )
  169.     end
  170.  
  171.     if ( weapon == 33 ) then
  172.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/33.png" )
  173.     end
  174.  
  175.     if ( weapon == 34 ) then
  176.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/34.png" )
  177.     end
  178.    
  179.     if ( weapon == 35 ) then
  180.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/35.png" )
  181.     end
  182.  
  183.     if ( weapon == 36 ) then
  184.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/36.png" )
  185.     end
  186.  
  187.     if ( weapon == 37 ) then
  188.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/37.png" )
  189.     end
  190.  
  191.     if ( weapon == 38 ) then
  192.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/38.png" )
  193.     end
  194.  
  195.     if ( weapon == 39 ) then
  196.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/39.png" )
  197.     end
  198.  
  199.     if ( weapon == 40 ) then
  200.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/40.png" )
  201.     end
  202.  
  203.     if ( weapon == 41 ) then
  204.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/41.png" )
  205.     end
  206.  
  207.     if ( weapon == 42 ) then
  208.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/42.png" )
  209.     end
  210.  
  211.     if ( weapon == 43 ) then
  212.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/43.png" )
  213.     end
  214.  
  215.     if ( weapon == 44 ) then
  216.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/44.png" )
  217.     end
  218.  
  219.     if ( weapon == 45 ) then
  220.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/45.png" )
  221.     end
  222.  
  223.     if ( weapon == 46 ) then
  224.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/46.png" )
  225.     end
  226.     end
  227. end)
  228.  
  229. function dxDrawEmptyRec(absX, absY, sizeX, sizeY, color, ancho)
  230.         dxDrawRectangle(absX, absY, sizeX, ancho, color)
  231.         dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color)
  232.         dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color)
  233.         dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho * 2, color)
  234. end
  235.  
  236. function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
  237.         dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  238.         dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  239.         dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  240.         dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  241.         dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  242.         dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  243.         dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  244.         dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  245.         dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
  246. end
  247.  
  248.  
  249.  
Bir şunu dene.
« Son Düzenleme: 24 Mayıs 2017, 23:14:18 Gönderen: Paradox »
 

fgamerr

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 17
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #3 : 24 Mayıs 2017, 23:13:21 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Kod: Lua
  1.         if stat < 1000 then
  2.         dxDrawRectangle(x*1386, y*84, x*149/100*vida, y*11, tocolor(244, 36, 0), false)
  3.         else
  4.         dxDrawRectangle(x*1386, y*84, (x*149/(100 + (stat - 569) / 4.31))*vida, y*11, tocolor(0, 0, 0, 180), false)
  5.         end
Bir şunu dene.

Sorun devam etmekte. :)
 

Paradox

  • Kurucu
  • *
  • İleti: 640
  • SH Gaming
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #4 : 24 Mayıs 2017, 23:14:44 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Sorun devam etmekte. :)

Üsteki iletiyi güncelledim birde onu denermisin.
 

Rüzgar

  • Acemi Üye
  • *
  • İleti: 158
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #5 : 24 Mayıs 2017, 23:16:14 »
Kod: Lua
  1.  
  2.         if vida >= 200 then
  3.             vida = 100
  4.         else
  5.             vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
  6.         end

Kod: Lua
  1. local sx,sy = guiGetScreenSize()
  2. local px,py = 1600,900
  3. local x,y =  (sx/px), (sy/py)          
  4. local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "radio", "vehicle_name" }
  5.  
  6. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
  7. function ()
  8.         for _, component in ipairs( components ) do
  9.                 setPlayerHudComponentVisible( component, false )
  10.         end
  11. end)
  12.  
  13. addEventHandler("onClientRender", root,
  14.   function()
  15.     local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
  16.     local ammo1 = getPedTotalAmmo (localPlayer,getPedWeaponSlot(localPlayer))
  17.     local armaID = getPedWeapon(localPlayer)
  18.     local Money = getPlayerMoney ( getLocalPlayer() )
  19.         local altura = 28
  20.     local imageL, imageA = 25,25
  21.     local image = "star.png"
  22.     vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
  23.  
  24.         oxigenio= getPedOxygenLevel ( getLocalPlayer() )
  25.         stat = getPedStat ( getLocalPlayer(), 24 )
  26.         showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
  27.         showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)
  28.         showammo3 = getPedTotalAmmo(getLocalPlayer())
  29.         wanted = getPlayerWantedLevel (getLocalPlayer())
  30.        
  31.         if oxigenio < 1000 or isElementInWater (getLocalPlayer()) then
  32.         dxDrawRectangle(x*1386, y*120, x*149/1000*oxigenio, y*11, tocolor(255, 127,0), false)
  33.         dxDrawEmptyRec(x*1386, y*120, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--BarrinhaOxigenio
  34.         end
  35.         if vida >= 200 then
  36.             vida = 100
  37.         else
  38.             vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
  39.         end
  40.         if stat < 1000 then
  41.         dxDrawRectangle(x*1386, y*84, x*149/100*vida, y*11, tocolor(244, 36, 0), false)
  42.         else
  43.         dxDrawRectangle(x*1386, y*84, x*149/200*vida, y*11, tocolor(0, 0, 0, 180), false)
  44.         end
  45.  
  46.     local armour = getPedArmor ( getLocalPlayer() )
  47.         dxDrawRectangle(x*1386, y*102, x*149, y*11, tocolor(0, 0, 0, 180), false)--fundo
  48.         if armour>0 then
  49.         dxDrawRectangle(x*1386, y*102, x*149/100*armour, y*11, tocolor(41, 134, 199, 255), false)
  50.         end
  51.         dxDrawEmptyRec(x*1386, y*84, x*149, y*11,  tocolor(0, 0, 0, 255), 1) --Can
  52.         dxDrawEmptyRec(x*1386, y*102, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--Çelik Yelek
  53.     dxDrawBorderedText(ammo1.." | "..ammo, x*1390, y*250, x*1513, y*120, tocolor(255, 255, 255, 255), 1.0, "default-bold", "center", "center", false, false, true, false, false)
  54.     dxDrawBorderedText(("%09d"):format(getPlayerMoney(localPlayer)).."$", x*1410, y*15, x*1510, y*120, tocolor(4, 122, 24), 1.0, "pricedown","center","center",false, false,true, false, false)
  55.        
  56.  
  57.  
  58.     weapon = getPedWeapon ( getLocalPlayer() )
  59.     if ( weapon == 0 ) then
  60.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/0.png" )
  61.     end
  62.  
  63.     if ( weapon == 1 ) then
  64.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/1.png" )
  65.     end
  66.  
  67.     if ( weapon == 2 ) then
  68.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/2.png" )
  69.     end
  70.  
  71.     if ( weapon == 3 ) then
  72.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/3.png" )
  73.     end
  74.  
  75.     if ( weapon == 4 ) then
  76.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/4.png" )
  77.     end
  78.  
  79.     if ( weapon == 5 ) then
  80.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/5.png" )
  81.     end
  82.  
  83.     if ( weapon == 6 ) then
  84.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/6.png" )
  85.     end
  86.  
  87.     if ( weapon == 7 ) then
  88.         dxDrawImage ( xx*1375, y*110, x*160, y*90, "img/7.png" )
  89.     end
  90.  
  91.     if ( weapon == 8 ) then
  92.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/8.png" )
  93.     end
  94.  
  95.     if ( weapon == 9 ) then
  96.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/9.png" )
  97.     end
  98.  
  99.     if ( weapon == 10 ) then
  100.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/10.png" )
  101.     end
  102.  
  103.     if ( weapon == 11 ) then
  104.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/11.png" )
  105.     end
  106.  
  107.     if ( weapon == 12 ) then
  108.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/12.png" )
  109.     end
  110.  
  111.     if ( weapon == 14 ) then
  112.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/14.png" )
  113.     end
  114.  
  115.     if ( weapon == 15 ) then
  116.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/15.png" )
  117.     end
  118.  
  119.     if ( weapon == 16 ) then
  120.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/16.png" )
  121.     end
  122.  
  123.     if ( weapon == 17 ) then
  124.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/17.png" )
  125.     end
  126.  
  127.     if ( weapon == 18 ) then
  128.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/18.png" )
  129.     end
  130.  
  131.     if ( weapon == 22 ) then
  132.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/22.png" )
  133.     end
  134.  
  135.     if ( weapon == 23 ) then
  136.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/23.png" )
  137.     end
  138.  
  139.     if ( weapon == 24 ) then
  140.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/24.png" )
  141.     end
  142.  
  143.     if ( weapon == 25 ) then
  144.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/25.png" )
  145.     end
  146.  
  147.     if ( weapon == 26 ) then
  148.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/26.png" )
  149.     end
  150.  
  151.     if ( weapon == 27 ) then
  152.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/27.png" )
  153.     end
  154.  
  155.     if ( weapon == 28 ) then
  156.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/28.png" )
  157.     end
  158.  
  159.     if ( weapon == 29 ) then
  160.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/29.png" )
  161.     end
  162.  
  163.     if ( weapon == 30 ) then
  164.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/30.png" )
  165.     end
  166.  
  167.     if ( weapon == 31 ) then
  168.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/31.png" )
  169.     end
  170.  
  171.     if ( weapon == 32 ) then
  172.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/32.png" )
  173.     end
  174.  
  175.     if ( weapon == 33 ) then
  176.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/33.png" )
  177.     end
  178.  
  179.     if ( weapon == 34 ) then
  180.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/34.png" )
  181.     end
  182.    
  183.     if ( weapon == 35 ) then
  184.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/35.png" )
  185.     end
  186.  
  187.     if ( weapon == 36 ) then
  188.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/36.png" )
  189.     end
  190.  
  191.     if ( weapon == 37 ) then
  192.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/37.png" )
  193.     end
  194.  
  195.     if ( weapon == 38 ) then
  196.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/38.png" )
  197.     end
  198.  
  199.     if ( weapon == 39 ) then
  200.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/39.png" )
  201.     end
  202.  
  203.     if ( weapon == 40 ) then
  204.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/40.png" )
  205.     end
  206.  
  207.     if ( weapon == 41 ) then
  208.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/41.png" )
  209.     end
  210.  
  211.     if ( weapon == 42 ) then
  212.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/42.png" )
  213.     end
  214.  
  215.     if ( weapon == 43 ) then
  216.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/43.png" )
  217.     end
  218.  
  219.     if ( weapon == 44 ) then
  220.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/44.png" )
  221.     end
  222.  
  223.     if ( weapon == 45 ) then
  224.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/45.png" )
  225.     end
  226.  
  227.     if ( weapon == 46 ) then
  228.         dxDrawImage ( x*1375, y*110, x*160, y*90, "img/46.png" )
  229.     end
  230.     end
  231. )
  232.  
  233. function dxDrawEmptyRec(absX, absY, sizeX, sizeY, color, ancho)
  234.         dxDrawRectangle(absX, absY, sizeX, ancho, color)
  235.         dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color)
  236.         dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color)
  237.         dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho * 2, color)
  238. end
  239.  
  240. function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
  241.         dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  242.         dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  243.         dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  244.         dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  245.         dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  246.         dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  247.         dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  248.         dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
  249.         dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
  250. end
 

MTASA-TURK | Türkiye'nin En Güncel MTA Platformu

Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #5 : 24 Mayıs 2017, 23:16:14 »

fgamerr

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 17
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #6 : 24 Mayıs 2017, 23:19:31 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Üsteki iletiyi güncelledim birde onu denermisin.

Loading script failed: blabla/hud.lua: 227 ' expected (to close '(' at line 14) near 'end) hatası verdi script başlatılamadı.

Mesaj Birleştirildi: 24 Mayıs 2017, 23:22:18
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Kod: Lua
  1.  
  2.         if vida >= 200 then
  3.             vida = 100
  4.         else
  5.             vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
  6.         end

Kod: Lua
  1.  
  2.         if vida >= 200 then
  3.             vida = 100
  4.  
  5. Bu satırlarda debugscript hata verdi, script bozuldu hiç açılmamakta.
« Son Düzenleme: 24 Mayıs 2017, 23:22:18 Gönderen: fgamerr »
 

Rüzgar

  • Acemi Üye
  • *
  • İleti: 158
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #7 : 24 Mayıs 2017, 23:23:30 »
Kullanım koşullarında herhangi bir sorun yok.
 
Mesajı Beğenenler: fgamerr

fgamerr

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 17
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #8 : 24 Mayıs 2017, 23:24:42 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Kullanım koşullarında herhangi bir sorun yok.

Scripti özelden atsam deneme imkanınız varmı?
 

Rüzgar

  • Acemi Üye
  • *
  • İleti: 158
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #9 : 24 Mayıs 2017, 23:25:46 »
Bekliyorum Seri olursan iyi olur
 
Mesajı Beğenenler: fgamerr

fgamerr

  • Yeni Üye
  • *
  • Default Avatar
  • İleti: 17
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #10 : 24 Mayıs 2017, 23:26:51 »
Özel mesaj ile ilettim.  :)

Mesaj Birleştirildi: 24 Mayıs 2017, 23:29:11
Paradox tarafından sorun çözülmüştür, ellerine sağlık teşekkür ederim.
Konu kilitlenebilir. İyi forumlar. :)
« Son Düzenleme: 24 Mayıs 2017, 23:29:11 Gönderen: fgamerr »
 

Paradox

  • Kurucu
  • *
  • İleti: 640
  • SH Gaming
Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #11 : 24 Mayıs 2017, 23:30:44 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Özel mesaj ile ilettim.  :)

Mesaj Birleştirildi: 24 Mayıs 2017, 23:29:11
Paradox tarafından sorun çözülmüştür, ellerine sağlık teşekkür ederim.
Konu kilitlenebilir. İyi forumlar. :)
Rica ederim. Konu sahibinin isteği üzerine konu kilit.