Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-04-02, 22:58


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

??cze si? z serwer loguje i nie mam hudu nie wiem oco chodzi jakie? b??dy

DB3 : http://imgur.com/a/Obl7L



local font =  dxCreateFont("font.otf"33)

local sw,sh guiGetScreenSize()

addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local ulica getZoneName(x,y,zfalse)
    local ulica2 getZoneName(x,y,ztrue)
    if ulica2~=ulica then ulica "   "..ulica.."\n"..ulica2 else ulica "   "..ulica end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(ulicasw*4/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255,255,255,255), 0.33font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)

resourceroot getResourceRootElement(getThisResource())
local noreloadweapons = {} --Weapons that doesn't reload (including the flamethrower, minigun, which doesn't have reload anim).
    noreloadweapons[16] = true
    noreloadweapons[17] = true
    noreloadweapons[18] = true
    noreloadweapons[19] = true
    noreloadweapons[25] = true
    noreloadweapons[33] = true
    noreloadweapons[34] = true
    noreloadweapons[35] = true
    noreloadweapons[36] = true
    noreloadweapons[37] = true
    noreloadweapons[38] = true
    noreloadweapons[39] = true
    noreloadweapons[41] = true
    noreloadweapons[42] = true
    noreloadweapons[43] = true

    local meleespecialweapons = {} --Weapons that don't shoot, and special weapons.
    meleespecialweapons[0] = true
    meleespecialweapons[1] = true
    meleespecialweapons[2] = true
    meleespecialweapons[3] = true
    meleespecialweapons[4] = true
    meleespecialweapons[5] = true
    meleespecialweapons[6] = true
    meleespecialweapons[7] = true
    meleespecialweapons[8] = true
    meleespecialweapons[9] = true
    meleespecialweapons[10] = true
    meleespecialweapons[11] = true
    meleespecialweapons[12] = true
    meleespecialweapons[13] = true
    meleespecialweapons[14] = true
    meleespecialweapons[15] = true
    meleespecialweapons[40] = true
    meleespecialweapons[44] = true
    meleespecialweapons[45] = true
    meleespecialweapons[46] = true

local moneyChangeTable = {["tick"] = 0, ["amount"] = 0}
    
function convertNumber ( number )  
    local formatted = number  
    while true do      
        formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
        if ( k==0 ) then      
            break   
        end  
    end  
    return formatted
end

local playerMoney = getPlayerMoney ( localPlayer )
    
addEventHandler("onClientRender", root, function()
    if isPlayerMapVisible() then return end
    
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("wanted", false)
    showPlayerHudComponent("weapon", false)
    showPlayerHudComponent("ammo", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("armour", false)
    showPlayerHudComponent("breath", false)
    
    if getElementData(localPlayer, "player:logged") then
    
    ammoinclip = getPedAmmoInClip (getLocalPlayer()) -- The ammo inside the clip
    totalammo = getPedTotalAmmo(getLocalPlayer())-getPedAmmoInClip(getLocalPlayer()) -- The total ammo minus ammo inside clip
    totalammo2 = getPedTotalAmmo(getLocalPlayer())
    showammo1 = ammoinclip
    showammo2 = totalammo
    showammo3 = totalammo2
    health = getElementHealth( getLocalPlayer() )
        lineLength1 = 114 * ( health / 100 ) -- Health bar

        armor = getPedArmor( getLocalPlayer() )
        lineLength2 = 114 * ( armor / 100 ) -- Armor bar
    
    
    local hour, mins = getTime ()
    time = hour .. ":" .. (((mins < 10) and "0"..mins) or mins)
    
    local kasa = string.format("%08d", getPlayerMoney(getLocalPlayer()))
    
    --dxDrawRectangle((sw - -700) / 2, (sh - 700) / 2, 100, 100, tocolor(0, 0, 0, 160))
    --dxDrawRectangle((sw - -910) / 2, (sh - 700) / 2, 149, 40, tocolor(0, 0, 0, 160))
    --dxDrawRectangle((sw - -910) / 2, (sh - 610) / 2, 149, 55, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*15.47/20, sh*1.24/20, sw*1.55/20, sh*2.5/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*17.1/20, sh*1.24/20, sw*2.34/20, sh*1/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*17.1/20, sh*2.4/20, sw*2.34/20, sh*1.35/20, tocolor(0, 0, 0, 160))
    --dxDrawRectangle((sw - -700) / 2, (sh - 490) / 2, 254, 50, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*15.47/20, sh*3.85/20, sw*3.97/20, sh*1.1/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*2.5/20, sh*18.8/20, sw*0.7/4, sh*1.1/21.9, tocolor(inDMZone and 100 or 0, 0, 0, 100))
    dxDrawText("Nick: "..getPlayerName(localPlayer).." UID: "..getElementData(localPlayer, "UID"), sw*4.6/20, sh*9.5/20, sw*4/20, sh*29/20, tocolor(250,250,250,200), 0.45, font, "center", "center")
    --dxDrawText("PLN "..kasa.."", (sw - \-715) / 2, (sh - 480) / 2, (sw - -700) / 2, (sh - 490) / 2, tocolor(5, 89, 0, 255), 0.7, font, "left", "top", false, false, false, false, false)
    dxDrawText("PLN "..money.."", sw*15.6/20, sh*3.9/20, sw*4/20, sh*27/20, tocolor(5, 89, 0, 255), 0.7, font, "left", "top", false, false, false, false, false)
    
    dxDrawText(tostring (time),sw*20/20, sh*1.18/20, sw*16.4/20, sh*1/20,tocolor(250,250,250,200),0.8,font,"center","top",false,false,false)
    
    tick = getTickCount () 
        
-- For active health bar
      local maxHealth = 100;  -- get max health stat
        local colourPercent = ( health / maxHealth ) * 200;
        local red, green; -- we don't need blue because we don't use it, it'll be 0
        if health < ( maxHealth then
        red 200;
        green = ( health 50 ) * ( colourPercent );
else
        green 200;
        red 200 - ( ( health 50 ) / 50 ) * 200;
end
-- For inactive health bar
        local maxHealth 75;  -- get max health stat
        local colourPercent1 = ( health maxHealth ) * 75;
        local red1green1; -- we don't need blue because we don'use itit'll be 0
        if health < ( maxHealth / 2 ) then
        red1 = 75;
        green1 = ( health / 50 ) * ( colourPercent1 * 2 );
else
        green1 = 75;
        red1 = 75 - ( ( health - 50 ) / 50 ) * 75;
end
local color1 = tocolor( 0, 0, 0, 255 )
local color2 = tocolor( 255, 0, 0, 255 )
 
 dxDrawRectangle(sw*17.2/20, sh*3.3/20, sw*1.88/20, sh*0.35/20,color1, false) -- Health inactive bar
 dxDrawRectangle(sw*17.25/20, sh*3.35/20,lineLength1,sh*0.25/20,color2,false) --Health active bar
 
 --[[if armor <= 0 then
 
 else
 dxDrawRectangle(sw*17.2/20, sh*2.85/20, sw*1.88/20, sh*0.35/20,tocolor(0,0,0,200),false)
dxDrawRectangle(sw*17.25/20, sh*2.9/20,lineLength2,sh*0.25/20,tocolor(200,200,200,200),false) -- Armor active bar -- Armor inactive bar
end]]
    
    local weaponID = getPedWeapon (getLocalPlayer()); -- Get weaponzz ID
    local weaponName = getWeaponNameFromID(weaponID)
    dxDrawImage(sw*15.57/20, sh*1.14/20, sw*1.35/20, sh*2.3/20,"img/hud/".. tostring( weaponName ) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,200),false)
    
    if noreloadweapons [getPedWeapon(getLocalPlayer())] then
    dxDrawText(sw*15.57/20, sh*1.14/20, sw*1.35/20, sh*2.3/20,tocolor(200,200,200,200),0.4,font,"right","top",false,false,false) -- No reload weapons (for shotgun, grenades, etc)

    elseif meleespecialweapons [getPedWeapon(getLocalPlayer())] then
    -- Draw Nothing for melee and special weapons.

    else --Weapons that reloads.
            dxDrawText(tostring (showammo2),(sw - -780) / 2, (sh - 540) / 2,(sw - -770) / 2, (sh - 700) / 2,tocolor(255,255,255,255),0.4,font,"right","top",false,false,false)
            dxDrawText("|",(sw - -800) / 2, (sh - 540) / 2,(sw - -790) / 2, (sh - 700) / 2,tocolor(255,255,255,255),0.4,font,"left","top",false,false,false)
            dxDrawText(tostring (showammo1),(sw - -820) / 2, (sh - 540) / 2,(sw - -810) / 2, (sh - 700) / 2,tocolor(255,255,255,255),0.4,font,"left","top",false,false,false)
    end
    
    else
    
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-02, 23:27


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466


local font =  dxCreateFont("font.otf"33)

local sw,sh guiGetScreenSize()

addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local ulica getZoneName(x,y,zfalse)
    local ulica2 getZoneName(x,y,ztrue)
    if ulica2~=ulica then ulica "   "..ulica.."\n"..ulica2 else ulica "   "..ulica end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(ulicasw*4/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255,255,255,255), 0.33font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)

resourceroot getResourceRootElement(getThisResource())
local noreloadweapons = {} --Weapons that doesn't reload (including the flamethrower, minigun, which doesn't have reload anim).
    noreloadweapons[16] = true
    noreloadweapons[17] = true
    noreloadweapons[18] = true
    noreloadweapons[19] = true
    noreloadweapons[25] = true
    noreloadweapons[33] = true
    noreloadweapons[34] = true
    noreloadweapons[35] = true
    noreloadweapons[36] = true
    noreloadweapons[37] = true
    noreloadweapons[38] = true
    noreloadweapons[39] = true
    noreloadweapons[41] = true
    noreloadweapons[42] = true
    noreloadweapons[43] = true

    local meleespecialweapons = {} --Weapons that don't shoot, and special weapons.
    meleespecialweapons[0] = true
    meleespecialweapons[1] = true
    meleespecialweapons[2] = true
    meleespecialweapons[3] = true
    meleespecialweapons[4] = true
    meleespecialweapons[5] = true
    meleespecialweapons[6] = true
    meleespecialweapons[7] = true
    meleespecialweapons[8] = true
    meleespecialweapons[9] = true
    meleespecialweapons[10] = true
    meleespecialweapons[11] = true
    meleespecialweapons[12] = true
    meleespecialweapons[13] = true
    meleespecialweapons[14] = true
    meleespecialweapons[15] = true
    meleespecialweapons[40] = true
    meleespecialweapons[44] = true
    meleespecialweapons[45] = true
    meleespecialweapons[46] = true

local moneyChangeTable = {["tick"] = 0, ["amount"] = 0}
    
function convertNumber ( number )  
    local formatted = number  
    while true do      
        formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
        if ( k==0 ) then      
            break   
        end  
    end  
    return formatted
end

local playerMoney = getPlayerMoney ( localPlayer )
    
addEventHandler("onClientRender", root, function()
    if isPlayerMapVisible() then return end
    
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("wanted", false)
    showPlayerHudComponent("weapon", false)
    showPlayerHudComponent("ammo", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("armour", false)
    showPlayerHudComponent("breath", false)
    
    if getElementData(localPlayer, "player:logged") then
    
    ammoinclip = getPedAmmoInClip (getLocalPlayer()) -- The ammo inside the clip
    totalammo = getPedTotalAmmo(getLocalPlayer())-getPedAmmoInClip(getLocalPlayer()) -- The total ammo minus ammo inside clip
    totalammo2 = getPedTotalAmmo(getLocalPlayer())
    showammo1 = ammoinclip
    showammo2 = totalammo
    showammo3 = totalammo2
    health = getElementHealth( getLocalPlayer() )
        lineLength1 = 114 * ( health / 100 ) -- Health bar

        armor = getPedArmor( getLocalPlayer() )
        lineLength2 = 114 * ( armor / 100 ) -- Armor bar
    
    
    local hour, mins = getTime ()
    time = hour .. ":" .. (((mins < 10) and "0"..mins) or mins)
    
    local kasa = string.format("%08d", getPlayerMoney(getLocalPlayer()))
    
    --dxDrawRectangle((sw - -700) / 2, (sh - 700) / 2, 100, 100, tocolor(0, 0, 0, 160))
    --dxDrawRectangle((sw - -910) / 2, (sh - 700) / 2, 149, 40, tocolor(0, 0, 0, 160))
    --dxDrawRectangle((sw - -910) / 2, (sh - 610) / 2, 149, 55, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*15.47/20, sh*1.24/20, sw*1.55/20, sh*2.5/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*17.1/20, sh*1.24/20, sw*2.34/20, sh*1/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*17.1/20, sh*2.4/20, sw*2.34/20, sh*1.35/20, tocolor(0, 0, 0, 160))
    --dxDrawRectangle((sw - -700) / 2, (sh - 490) / 2, 254, 50, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*15.47/20, sh*3.85/20, sw*3.97/20, sh*1.1/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*2.5/20, sh*18.8/20, sw*0.7/4, sh*1.1/21.9, tocolor(inDMZone and 100 or 0, 0, 0, 100))
    dxDrawText("Nick: "..getPlayerName(localPlayer).." UID: "..getElementData(localPlayer, "UID"), sw*4.6/20, sh*9.5/20, sw*4/20, sh*29/20, tocolor(250,250,250,200), 0.45, font, "center", "center")
    --dxDrawText("PLN "..kasa.."", (sw - \-715) / 2, (sh - 480) / 2, (sw - -700) / 2, (sh - 490) / 2, tocolor(5, 89, 0, 255), 0.7, font, "left", "top", false, false, false, false, false)
    dxDrawText("PLN "..kasa.."", sw*15.6/20, sh*3.9/20, sw*4/20, sh*27/20, tocolor(5, 89, 0, 255), 0.7, font, "left", "top", false, false, false, false, false)
    
    dxDrawText(tostring (time),sw*20/20, sh*1.18/20, sw*16.4/20, sh*1/20,tocolor(250,250,250,200),0.8,font,"center","top",false,false,false)
    
    tick = getTickCount () 
        
-- For active health bar
      local maxHealth = 100;  -- get max health stat
        local colourPercent = ( health / maxHealth ) * 200;
        local red, green; -- we don't need blue because we don't use it, it'll be 0
        if health < ( maxHealth then
        red 200;
        green = ( health 50 ) * ( colourPercent );
else
        green 200;
        red 200 - ( ( health 50 ) / 50 ) * 200;
end
-- For inactive health bar
        local maxHealth 75;  -- get max health stat
        local colourPercent1 = ( health maxHealth ) * 75;
        local red1green1; -- we don't need blue because we don'use ititll be 0
        if health < ( maxHealth then
        red1 75;
        green1 = ( health 50 ) * ( colourPercent1 );
else
        green1 75;
        red1 75 - ( ( health 50 ) / 50 ) * 75;
end
local color1 tocolor000255 )
local color2 tocolor25500255 )
 
 dxDrawRectangle(sw*17.2/20sh*3.3/20sw*1.88/20sh*0.35/20,color1false) -- Health inactive bar
 dxDrawRectangle(sw*17.25/20sh*3.35/20,lineLength1,sh*0.25/20,color2,false) --Health active bar
 
 --[[if armor <= 0 then
 
 else
 dxDrawRectangle(sw*17.2/20sh*2.85/20sw*1.88/20sh*0.35/20,tocolor(0,0,0,200),false)
dxDrawRectangle(sw*17.25/20sh*2.9/20,lineLength2,sh*0.25/20,tocolor(200,200,200,200),false) -- Armor active bar -- Armor inactive bar
end]]
    
    local weaponID getPedWeapon (getLocalPlayer()); -- Get weaponzz ID
    local weaponName getWeaponNameFromID(weaponID)
    dxDrawImage(sw*15.57/20sh*1.14/20sw*1.35/20sh*2.3/20,"img/hud/".. tostringweaponName ) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,200),false)
    
    if noreloadweapons [getPedWeapon(getLocalPlayer())] then
    dxDrawText(sw*15.57/20sh*1.14/20sw*1.35/20sh*2.3/20,tocolor(200,200,200,200),0.4,font,"right","top",false,false,false) -- No reload weapons (for shotgungrenadesetc)

    elseif meleespecialweapons [getPedWeapon(getLocalPlayer())] then
    -- Draw Nothing for melee and special weapons.

    else --Weapons that reloads.
            dxDrawText(tostring (showammo2),(sw - -780) / 2, (sh 540) / 2,(sw - -770) / 2, (sh 700) / 2,tocolor(255,255,255,255),0.4,font,"right","top",false,false,false)
            dxDrawText("|",(sw - -800) / 2, (sh 540) / 2,(sw - -790) / 2, (sh 700) / 2,tocolor(255,255,255,255),0.4,font,"left","top",false,false,false)
            dxDrawText(tostring (showammo1),(sw - -820) / 2, (sh 540) / 2,(sw - -810) / 2, (sh 700) / 2,tocolor(255,255,255,255),0.4,font,"left","top",false,false,false)
    end
    
    else
    
    end
end)


Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-03, 13:09


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Ten sam b??d

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-03, 13:34


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4182 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

tocolor(inDMZone and 100 or 000100)

Nie widz? w tym kodzie ?adnej funckji inDMZone

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-03, 13:52


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

i teraz podaj dok?adnie linijk? z b??dem

local font =  dxCreateFont("font.otf"33)

local sw,sh guiGetScreenSize()

addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local ulica getZoneName(x,y,zfalse)
    local ulica2 getZoneName(x,y,ztrue)
    if ulica2~=ulica then ulica "   "..ulica.."\n"..ulica2 else ulica "   "..ulica end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(ulicasw*4/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255,255,255,255), 0.33font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)

resourceroot getResourceRootElement(getThisResource())
local noreloadweapons = {} --Weapons that doesn't reload (including the flamethrower, minigun, which doesn't have reload anim).
    noreloadweapons[16] = true
    noreloadweapons[17] = true
    noreloadweapons[18] = true
    noreloadweapons[19] = true
    noreloadweapons[25] = true
    noreloadweapons[33] = true
    noreloadweapons[34] = true
    noreloadweapons[35] = true
    noreloadweapons[36] = true
    noreloadweapons[37] = true
    noreloadweapons[38] = true
    noreloadweapons[39] = true
    noreloadweapons[41] = true
    noreloadweapons[42] = true
    noreloadweapons[43] = true

    local meleespecialweapons = {} --Weapons that don't shoot, and special weapons.
    meleespecialweapons[0] = true
    meleespecialweapons[1] = true
    meleespecialweapons[2] = true
    meleespecialweapons[3] = true
    meleespecialweapons[4] = true
    meleespecialweapons[5] = true
    meleespecialweapons[6] = true
    meleespecialweapons[7] = true
    meleespecialweapons[8] = true
    meleespecialweapons[9] = true
    meleespecialweapons[10] = true
    meleespecialweapons[11] = true
    meleespecialweapons[12] = true
    meleespecialweapons[13] = true
    meleespecialweapons[14] = true
    meleespecialweapons[15] = true
    meleespecialweapons[40] = true
    meleespecialweapons[44] = true
    meleespecialweapons[45] = true
    meleespecialweapons[46] = true

local moneyChangeTable = {["tick"] = 0, ["amount"] = 0}
    
function convertNumber ( number )  
    local formatted = number  
    while true do      
        formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')    
        if ( k==0 ) then      
            break   
        end  
    end  
    return formatted
end

local playerMoney = getPlayerMoney ( localPlayer )
    
addEventHandler("onClientRender", root, function()
    if isPlayerMapVisible() then return end
    
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("wanted", false)
    showPlayerHudComponent("weapon", false)
    showPlayerHudComponent("ammo", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("armour", false)
    showPlayerHudComponent("breath", false)
    
    if getElementData(localPlayer, "player:logged") then
    
    ammoinclip = getPedAmmoInClip (getLocalPlayer()) -- The ammo inside the clip
    totalammo = getPedTotalAmmo(getLocalPlayer())-getPedAmmoInClip(getLocalPlayer()) -- The total ammo minus ammo inside clip
    totalammo2 = getPedTotalAmmo(getLocalPlayer())
    showammo1 = ammoinclip
    showammo2 = totalammo
    showammo3 = totalammo2
    health = getElementHealth( getLocalPlayer() )
        lineLength1 = 114 * ( health / 100 ) -- Health bar

        armor = getPedArmor( getLocalPlayer() )
        lineLength2 = 114 * ( armor / 100 ) -- Armor bar
    
    
    local hour, mins = getTime ()
    time = hour .. ":" .. (((mins < 10) and "0"..mins) or mins)
    
    local kasa = string.format("%08d", getPlayerMoney(getLocalPlayer()))
    dxDrawRectangle(sw*15.47/20, sh*1.24/20, sw*1.55/20, sh*2.5/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*17.1/20, sh*1.24/20, sw*2.34/20, sh*1/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*17.1/20, sh*2.4/20, sw*2.34/20, sh*1.35/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*15.47/20, sh*3.85/20, sw*3.97/20, sh*1.1/20, tocolor(0, 0, 0, 160))
    dxDrawRectangle(sw*2.5/20, sh*18.8/20, sw*0.7/4, sh*1.1/21.9, tocolor(inDMZone and 100 or 0, 0, 0, 100))
    dxDrawText("Nick: "..getPlayerName(localPlayer).." UID: "..getElementData(localPlayer, "UID"), sw*4.6/20, sh*9.5/20, sw*4/20, sh*29/20, tocolor(250,250,250,200), 0.45, font, "center", "center")
    dxDrawText("PLN "..kasa.."", sw*15.6/20, sh*3.9/20, sw*4/20, sh*27/20, tocolor(5, 89, 0, 255), 0.7, font, "left", "top", false, false, false, false, false)
    
    dxDrawText(tostring (time),sw*20/20, sh*1.18/20, sw*16.4/20, sh*1/20,tocolor(250,250,250,200),0.8,font,"center","top",false,false,false)
    
    tick = getTickCount () 
        
      local maxHealth = 100;  -- get max health stat
        local colourPercent = ( health / maxHealth ) * 200;
        local red, green; -- we don't need blue because we don't use it, it'll be 0
        if health < ( maxHealth then
        red 200;
        green = ( health 50 ) * ( colourPercent );
else
        green 200;
        red 200 - ( ( health 50 ) / 50 ) * 200;
end
-- For inactive health bar
        local maxHealth 75;  -- get max health stat
        local colourPercent1 = ( health maxHealth ) * 75;
        local red1green1; -- we don't need blue because we don'use ititll be 0
        if health < ( maxHealth then
        red1 75;
        green1 = ( health 50 ) * ( colourPercent1 );
else
        green1 75;
        red1 75 - ( ( health 50 ) / 50 ) * 75;
end
local color1 tocolor000255 )
local color2 tocolor25500255 )
 
 dxDrawRectangle(sw*17.2/20sh*3.3/20sw*1.88/20sh*0.35/20,color1false) -- Health inactive bar
 dxDrawRectangle(sw*17.25/20sh*3.35/20,lineLength1,sh*0.25/20,color2,false) --Health active bar
    
    local weaponID getPedWeapon (getLocalPlayer()); -- Get weaponzz ID
    local weaponName getWeaponNameFromID(weaponID)
    dxDrawImage(sw*15.57/20sh*1.14/20sw*1.35/20sh*2.3/20,"img/hud/".. tostringweaponName ) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,200),false)
    
    if noreloadweapons [getPedWeapon(getLocalPlayer())] then
    dxDrawText(sw*15.57/20sh*1.14/20sw*1.35/20sh*2.3/20,tocolor(200,200,200,200),0.4,font,"right","top",false,false,false) -- No reload weapons (for shotgungrenadesetc)

    elseif meleespecialweapons [getPedWeapon(getLocalPlayer())] then
    -- Draw Nothing for melee and special weapons.

    else --Weapons that reloads.
            dxDrawText(tostring (showammo2),(sw - -780) / 2, (sh 540) / 2,(sw - -770) / 2, (sh 700) / 2,tocolor(255,255,255,255),0.4,font,"right","top",false,false,false)
            dxDrawText("|",(sw - -800) / 2, (sh 540) / 2,(sw - -790) / 2, (sh 700) / 2,tocolor(255,255,255,255),0.4,font,"left","top",false,false,false)
            dxDrawText(tostring (showammo1),(sw - -820) / 2, (sh 540) / 2,(sw - -810) / 2, (sh 700) / 2,tocolor(255,255,255,255),0.4,font,"left","top",false,false,false)
    end
    
    else
    
    end
end)


[ Dodano: 2017-04-03, 13:54 ]
Pumelowsky, to nie jest funkcja

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-03, 17:24


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Jak ja sam nie wiem,

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-03, 17:51


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

Krzemo1234, ... podasz czy nie?

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-03, 18:10


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

jak j? znale??

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-04-03, 19:48


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

Krzemo1234, No nie wiem, wgraj kod kt?ry Ci poda?em i podaj db3?

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Krzemo1234
Tagi: nie :: działą :: hud
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku