[YARDIM] HUD Scriptinde Can Barı Taşıyor

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı fgamerr

  • Yeni Üye
  • *
    • İleti: 17
: 24 Mayıs 2017, 21:52:26
Nasıl ayarlayabilirim arkadaşlar?

Kod: lua
function tik()
local sx,sy = guiGetScreenSize()
local px,py = 1600,900
local x,y =  (sx/px), (sy/py)
local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "radio", "vehicle_name" }
 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function ()
for _, component in ipairs( components ) do
setPlayerHudComponentVisible( component, false )
end
end)

addEventHandler("onClientRender", root,
  function()
    local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
    local ammo1 = getPedTotalAmmo (localPlayer,getPedWeaponSlot(localPlayer))
    local armaID = getPedWeapon(localPlayer)
    local Money = getPlayerMoney ( getLocalPlayer() )
local altura = 28
    local imageL, imageA = 25,25
    local image = "star.png"
    vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596

oxigenio= getPedOxygenLevel ( getLocalPlayer() )
stat = getPedStat ( getLocalPlayer(), 24 )
showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)
showammo3 = getPedTotalAmmo(getLocalPlayer())
wanted = getPlayerWantedLevel (getLocalPlayer())

if oxigenio < 1000 or isElementInWater (getLocalPlayer()) then
dxDrawRectangle(x*1386, y*120, x*149/1000*oxigenio, y*11, tocolor(255, 127,0), false)
dxDrawEmptyRec(x*1386, y*120, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--BarrinhaOxigenio
end
if stat < 1000 then
dxDrawRectangle(x*1386, y*84, x*149/100*vida, y*11, tocolor(244, 36, 0), false)
else
dxDrawRectangle(x*1386, y*84, x*149/200*vida, y*11, tocolor(0, 0, 0, 180), false)
end

    local armour = getPedArmor ( getLocalPlayer() )
dxDrawRectangle(x*1386, y*102, x*149, y*11, tocolor(0, 0, 0, 180), false)--fundo
if armour>0 then
dxDrawRectangle(x*1386, y*102, x*149/100*armour, y*11, tocolor(41, 134, 199, 255), false)
end
dxDrawEmptyRec(x*1386, y*84, x*149, y*11,  tocolor(0, 0, 0, 255), 1) --Can
dxDrawEmptyRec(x*1386, y*102, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--Çelik Yelek
    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)
    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)



    weapon = getPedWeapon ( getLocalPlayer() )
    if ( weapon == 0 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/0.png" )
    end

    if ( weapon == 1 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/1.png" )
    end

    if ( weapon == 2 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/2.png" )
    end

    if ( weapon == 3 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/3.png" )
    end

    if ( weapon == 4 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/4.png" )
    end

    if ( weapon == 5 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/5.png" )
    end

    if ( weapon == 6 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/6.png" )
    end

    if ( weapon == 7 ) then
        dxDrawImage ( xx*1375, y*110, x*160, y*90, "img/7.png" )
    end

    if ( weapon == 8 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/8.png" )
    end

    if ( weapon == 9 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/9.png" )
    end

    if ( weapon == 10 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/10.png" )
    end

    if ( weapon == 11 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/11.png" )
    end

    if ( weapon == 12 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/12.png" )
    end

    if ( weapon == 14 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/14.png" )
    end

    if ( weapon == 15 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/15.png" )
    end

    if ( weapon == 16 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/16.png" )
    end

    if ( weapon == 17 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/17.png" )
    end

    if ( weapon == 18 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/18.png" )
    end

    if ( weapon == 22 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/22.png" )
    end

    if ( weapon == 23 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/23.png" )
    end

    if ( weapon == 24 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/24.png" )
    end

    if ( weapon == 25 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/25.png" )
    end

    if ( weapon == 26 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/26.png" )
    end

    if ( weapon == 27 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/27.png" )
    end

    if ( weapon == 28 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/28.png" )
    end

    if ( weapon == 29 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/29.png" )
    end

    if ( weapon == 30 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/30.png" )
    end

    if ( weapon == 31 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/31.png" )
    end

    if ( weapon == 32 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/32.png" )
    end

    if ( weapon == 33 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/33.png" )
    end

    if ( weapon == 34 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/34.png" )
    end
   
    if ( weapon == 35 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/35.png" )
    end

    if ( weapon == 36 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/36.png" )
    end

    if ( weapon == 37 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/37.png" )
    end

    if ( weapon == 38 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/38.png" )
    end

    if ( weapon == 39 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/39.png" )
    end

    if ( weapon == 40 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/40.png" )
    end

    if ( weapon == 41 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/41.png" )
    end

    if ( weapon == 42 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/42.png" )
    end

    if ( weapon == 43 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/43.png" )
    end

    if ( weapon == 44 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/44.png" )
    end

    if ( weapon == 45 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/45.png" )
    end

    if ( weapon == 46 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/46.png" )
    end
    end
)

function dxDrawEmptyRec(absX, absY, sizeX, sizeY, color, ancho)
dxDrawRectangle(absX, absY, sizeX, ancho, color)
dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color)
dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color)
dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho * 2, color)
end

function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
end


Linki görebilmek için Kayıt olun yada Giriş yapın.

« Son Düzenleme: 25 Mayıs 2017, 20:43:57 Gönderen: Narkoz »
 


MTASATURK

[YARDIM] HUD Scriptinde Can Barı Taşıyor
« : 24 Mayıs 2017, 21:52:26 »

Çevrimdışı Rambo

  • Ramazan Sert
  • Acemi Üye
  • *
    • İleti: 188
  • AÜ - Bilgisayar Mühendisliği
Yanıtla #1 : 24 Mayıs 2017, 22:04:25
Adam yazarken yanlış yapmış Linki görebilmek için Kayıt olun yada Giriş yapın. a mesaj gönder özelden yardım edebilir
 


Çevrimdışı Paradox

  • Kurucu
  • *
    • İleti: 684
  • SH Gaming
Yanıtla #2 : 24 Mayıs 2017, 22:05:18
Kod: lua
function tik()
local sx,sy = guiGetScreenSize()
local px,py = 1600,900
local x,y =  (sx/px), (sy/py)           
local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "radio", "vehicle_name" }
 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function ()
        for _, component in ipairs( components ) do
                setPlayerHudComponentVisible( component, false )
        end
end)
 
addEventHandler("onClientRender", root,
  function()
    local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
    local ammo1 = getPedTotalAmmo (localPlayer,getPedWeaponSlot(localPlayer))
    local armaID = getPedWeapon(localPlayer)
    local Money = getPlayerMoney ( getLocalPlayer() )
        local altura = 28
    local imageL, imageA = 25,25
    local image = "star.png"
    vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
 
        oxigenio= getPedOxygenLevel ( getLocalPlayer() )
        stat = getPedStat ( getLocalPlayer(), 24 )
        showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
        showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)
        showammo3 = getPedTotalAmmo(getLocalPlayer())
        wanted = getPlayerWantedLevel (getLocalPlayer())
       
        if oxigenio < 1000 or isElementInWater (getLocalPlayer()) then
        dxDrawRectangle(x*1386, y*120, x*149/1000*oxigenio, y*11, tocolor(255, 127,0), false)
        dxDrawEmptyRec(x*1386, y*120, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--BarrinhaOxigenio
        end
        if stat == 1000 then
        dxDrawRectangle(x*1386, y*84, x*149/200*vida, y*11, tocolor(244, 36, 0), false)
        else
        dxDrawRectangle(x*1386, y*84, (x*149/(100 + (stat - 569) / 4.31))*vida, y*11, tocolor(0, 0, 0, 180), false)
        end
 
    local armour = getPedArmor ( getLocalPlayer() )
        dxDrawRectangle(x*1386, y*102, x*149, y*11, tocolor(0, 0, 0, 180), false)--fundo
        if armour>0 then
        dxDrawRectangle(x*1386, y*102, x*149/100*armour, y*11, tocolor(41, 134, 199, 255), false)
        end
        dxDrawEmptyRec(x*1386, y*84, x*149, y*11,  tocolor(0, 0, 0, 255), 1) --Can
        dxDrawEmptyRec(x*1386, y*102, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--Çelik Yelek
    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)
    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)
       
 
 
    weapon = getPedWeapon ( getLocalPlayer() )
    if ( weapon == 0 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/0.png" )
    end
 
    if ( weapon == 1 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/1.png" )
    end
 
    if ( weapon == 2 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/2.png" )
    end
 
    if ( weapon == 3 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/3.png" )
    end
 
    if ( weapon == 4 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/4.png" )
    end
 
    if ( weapon == 5 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/5.png" )
    end
 
    if ( weapon == 6 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/6.png" )
    end
 
    if ( weapon == 7 ) then
        dxDrawImage ( xx*1375, y*110, x*160, y*90, "img/7.png" )
    end
 
    if ( weapon == 8 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/8.png" )
    end
 
    if ( weapon == 9 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/9.png" )
    end
 
    if ( weapon == 10 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/10.png" )
    end
 
    if ( weapon == 11 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/11.png" )
    end
 
    if ( weapon == 12 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/12.png" )
    end
 
    if ( weapon == 14 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/14.png" )
    end
 
    if ( weapon == 15 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/15.png" )
    end
 
    if ( weapon == 16 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/16.png" )
    end
 
    if ( weapon == 17 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/17.png" )
    end
 
    if ( weapon == 18 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/18.png" )
    end
 
    if ( weapon == 22 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/22.png" )
    end
 
    if ( weapon == 23 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/23.png" )
    end
 
    if ( weapon == 24 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/24.png" )
    end
 
    if ( weapon == 25 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/25.png" )
    end
 
    if ( weapon == 26 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/26.png" )
    end
 
    if ( weapon == 27 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/27.png" )
    end
 
    if ( weapon == 28 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/28.png" )
    end
 
    if ( weapon == 29 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/29.png" )
    end
 
    if ( weapon == 30 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/30.png" )
    end
 
    if ( weapon == 31 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/31.png" )
    end
 
    if ( weapon == 32 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/32.png" )
    end
 
    if ( weapon == 33 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/33.png" )
    end
 
    if ( weapon == 34 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/34.png" )
    end
   
    if ( weapon == 35 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/35.png" )
    end
 
    if ( weapon == 36 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/36.png" )
    end
 
    if ( weapon == 37 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/37.png" )
    end
 
    if ( weapon == 38 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/38.png" )
    end
 
    if ( weapon == 39 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/39.png" )
    end
 
    if ( weapon == 40 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/40.png" )
    end
 
    if ( weapon == 41 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/41.png" )
    end
 
    if ( weapon == 42 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/42.png" )
    end
 
    if ( weapon == 43 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/43.png" )
    end
 
    if ( weapon == 44 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/44.png" )
    end
 
    if ( weapon == 45 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/45.png" )
    end
 
    if ( weapon == 46 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/46.png" )
    end
    end
end)
 
function dxDrawEmptyRec(absX, absY, sizeX, sizeY, color, ancho)
        dxDrawRectangle(absX, absY, sizeX, ancho, color)
        dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color)
        dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color)
        dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho * 2, color)
end
 
function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
        dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
end


Bir şunu dene.
« Son Düzenleme: 24 Mayıs 2017, 22:08:07 Gönderen: Paradox »
 


Çevrimdışı fgamerr

  • Yeni Üye
  • *
    • İleti: 17
Yanıtla #3 : 24 Mayıs 2017, 22:07:10
Linki görebilmek için Kayıt olun yada Giriş yapın.
Kod: lua
        if stat < 1000 then
        dxDrawRectangle(x*1386, y*84, x*149/100*vida, y*11, tocolor(244, 36, 0), false)
        else
        dxDrawRectangle(x*1386, y*84, (x*149/(100 + (stat - 569) / 4.31))*vida, y*11, tocolor(0, 0, 0, 180), false)
        end
Bir şunu dene.

Sorun devam etmekte. :)
 


Çevrimdışı Paradox

  • Kurucu
  • *
    • İleti: 684
  • SH Gaming
Yanıtla #4 : 24 Mayıs 2017, 22:08:33
Linki görebilmek için Kayıt olun yada Giriş yapın.
Sorun devam etmekte. :)

Üsteki iletiyi güncelledim birde onu denermisin.
 


Çevrimdışı Rüzgar

  • Acemi Üye
  • *
    • İleti: 158
Yanıtla #5 : 24 Mayıs 2017, 22:10:03
Kod: lua
 
        if vida >= 200 then
            vida = 100
        else
            vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
        end

Kod: lua
local sx,sy = guiGetScreenSize()
local px,py = 1600,900
local x,y =  (sx/px), (sy/py)           
local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "radio", "vehicle_name" }
 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function ()
        for _, component in ipairs( components ) do
                setPlayerHudComponentVisible( component, false )
        end
end)
 
addEventHandler("onClientRender", root,
  function()
    local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
    local ammo1 = getPedTotalAmmo (localPlayer,getPedWeaponSlot(localPlayer))
    local armaID = getPedWeapon(localPlayer)
    local Money = getPlayerMoney ( getLocalPlayer() )
        local altura = 28
    local imageL, imageA = 25,25
    local image = "star.png"
    vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
 
        oxigenio= getPedOxygenLevel ( getLocalPlayer() )
        stat = getPedStat ( getLocalPlayer(), 24 )
        showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))
        showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)
        showammo3 = getPedTotalAmmo(getLocalPlayer())
        wanted = getPlayerWantedLevel (getLocalPlayer())
       
        if oxigenio < 1000 or isElementInWater (getLocalPlayer()) then
        dxDrawRectangle(x*1386, y*120, x*149/1000*oxigenio, y*11, tocolor(255, 127,0), false)
        dxDrawEmptyRec(x*1386, y*120, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--BarrinhaOxigenio
        end
        if vida >= 200 then
            vida = 100
        else
            vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
        end
        if stat < 1000 then
        dxDrawRectangle(x*1386, y*84, x*149/100*vida, y*11, tocolor(244, 36, 0), false)
        else
        dxDrawRectangle(x*1386, y*84, x*149/200*vida, y*11, tocolor(0, 0, 0, 180), false)
        end
 
    local armour = getPedArmor ( getLocalPlayer() )
        dxDrawRectangle(x*1386, y*102, x*149, y*11, tocolor(0, 0, 0, 180), false)--fundo
        if armour>0 then
        dxDrawRectangle(x*1386, y*102, x*149/100*armour, y*11, tocolor(41, 134, 199, 255), false)
        end
        dxDrawEmptyRec(x*1386, y*84, x*149, y*11,  tocolor(0, 0, 0, 255), 1) --Can
        dxDrawEmptyRec(x*1386, y*102, x*149, y*11,  tocolor(0, 0, 0, 255), 1)--Çelik Yelek
    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)
    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)
       
 
 
    weapon = getPedWeapon ( getLocalPlayer() )
    if ( weapon == 0 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/0.png" )
    end
 
    if ( weapon == 1 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/1.png" )
    end
 
    if ( weapon == 2 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/2.png" )
    end
 
    if ( weapon == 3 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/3.png" )
    end
 
    if ( weapon == 4 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/4.png" )
    end
 
    if ( weapon == 5 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/5.png" )
    end
 
    if ( weapon == 6 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/6.png" )
    end
 
    if ( weapon == 7 ) then
        dxDrawImage ( xx*1375, y*110, x*160, y*90, "img/7.png" )
    end
 
    if ( weapon == 8 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/8.png" )
    end
 
    if ( weapon == 9 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/9.png" )
    end
 
    if ( weapon == 10 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/10.png" )
    end
 
    if ( weapon == 11 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/11.png" )
    end
 
    if ( weapon == 12 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/12.png" )
    end
 
    if ( weapon == 14 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/14.png" )
    end
 
    if ( weapon == 15 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/15.png" )
    end
 
    if ( weapon == 16 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/16.png" )
    end
 
    if ( weapon == 17 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/17.png" )
    end
 
    if ( weapon == 18 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/18.png" )
    end
 
    if ( weapon == 22 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/22.png" )
    end
 
    if ( weapon == 23 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/23.png" )
    end
 
    if ( weapon == 24 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/24.png" )
    end
 
    if ( weapon == 25 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/25.png" )
    end
 
    if ( weapon == 26 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/26.png" )
    end
 
    if ( weapon == 27 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/27.png" )
    end
 
    if ( weapon == 28 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/28.png" )
    end
 
    if ( weapon == 29 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/29.png" )
    end
 
    if ( weapon == 30 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/30.png" )
    end
 
    if ( weapon == 31 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/31.png" )
    end
 
    if ( weapon == 32 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/32.png" )
    end
 
    if ( weapon == 33 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/33.png" )
    end
 
    if ( weapon == 34 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/34.png" )
    end
   
    if ( weapon == 35 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/35.png" )
    end
 
    if ( weapon == 36 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/36.png" )
    end
 
    if ( weapon == 37 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/37.png" )
    end
 
    if ( weapon == 38 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/38.png" )
    end
 
    if ( weapon == 39 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/39.png" )
    end
 
    if ( weapon == 40 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/40.png" )
    end
 
    if ( weapon == 41 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/41.png" )
    end
 
    if ( weapon == 42 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/42.png" )
    end
 
    if ( weapon == 43 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/43.png" )
    end
 
    if ( weapon == 44 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/44.png" )
    end
 
    if ( weapon == 45 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/45.png" )
    end
 
    if ( weapon == 46 ) then
        dxDrawImage ( x*1375, y*110, x*160, y*90, "img/46.png" )
    end
    end
)
 
function dxDrawEmptyRec(absX, absY, sizeX, sizeY, color, ancho)
        dxDrawRectangle(absX, absY, sizeX, ancho, color)
        dxDrawRectangle(absX, absY + ancho, ancho, sizeY - ancho, color)
        dxDrawRectangle(absX + ancho, absY + sizeY - ancho, sizeX - ancho, ancho, color)
        dxDrawRectangle(absX + sizeX - ancho, absY + ancho, ancho, sizeY - ancho * 2, color)
end
 
function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
        dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )
        dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
end
 


MTASATURK

Ynt: HUD Scriptinde, Can barı taşıyor.
« Yanıtla #5 : 24 Mayıs 2017, 22:10:03 »

Çevrimdışı fgamerr

  • Yeni Üye
  • *
    • İleti: 17
Yanıtla #6 : 24 Mayıs 2017, 22:13:20
Linki görebilmek için Kayıt olun yada 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, 22:16:07
Linki görebilmek için Kayıt olun yada Giriş yapın.
Kod: lua
 
        if vida >= 200 then
            vida = 100
        else
            vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596
        end

Kod: lua

        if vida >= 200 then
            vida = 100

Bu satırlarda debugscript hata verdi, script bozuldu hiç açılmamakta.
« Son Düzenleme: 24 Mayıs 2017, 22:16:07 Gönderen: fgamerr »
 


Çevrimdışı Rüzgar

  • Acemi Üye
  • *
    • İleti: 158
Yanıtla #7 : 24 Mayıs 2017, 22:17:19
Kullanım koşullarında herhangi bir sorun yok.
 


Çevrimdışı fgamerr

  • Yeni Üye
  • *
    • İleti: 17
Yanıtla #8 : 24 Mayıs 2017, 22:18:31
Linki görebilmek için Kayıt olun yada Giriş yapın.
Kullanım koşullarında herhangi bir sorun yok.

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


Çevrimdışı Rüzgar

  • Acemi Üye
  • *
    • İleti: 158
Yanıtla #9 : 24 Mayıs 2017, 22:19:35
Bekliyorum Seri olursan iyi olur
 


Çevrimdışı fgamerr

  • Yeni Üye
  • *
    • İleti: 17
Yanıtla #10 : 24 Mayıs 2017, 22:20:40
Özel mesaj ile ilettim.  :)

Mesaj Birleştirildi: 24 Mayıs 2017, 22:23:00
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, 22:23:00 Gönderen: fgamerr »
 


Çevrimdışı Paradox

  • Kurucu
  • *
    • İleti: 684
  • SH Gaming
Yanıtla #11 : 24 Mayıs 2017, 22:24:33
Linki görebilmek için Kayıt olun yada Giriş yapın.
Özel mesaj ile ilettim.  :)

Mesaj Birleştirildi: 24 Mayıs 2017, 22:23:00
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.