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

Wysłany: 2021-10-30, 16:50


frigy







Wiek: 20
Na forum: 2042 dni
Posty: 13
Nick w MP: frigy



Respekt: 50

siemka, czy kto? m?g?by do tego kodu doda? linijke na przecinki (?eby by?o 999,999pln a nie 999999)?


function render()
        dxDrawRectangle(14838826721tocolor(000255), false)
        dxDrawRectangle(155211919821tocolor(000255), false)
        dxDrawRectangle(148388267/100*getElementHealth(localPlayer), 21tocolor(24619675255), false)
        if getPedArmor(localPlayer)>0 then
            dxDrawRectangle(1552119198/100*getPedArmor(localPlayer), 21tocolor(255255255255), false)
        end
        dxDrawImage(172418175174"logo.png"000tocolor(255255255255), false)
        dxDrawImage(15371103032"i/armor.png"000tocolor(255255255255), false)
        dxDrawImage(1467793636"i/heart.png"000tocolor(255255255255), false)
        time=getRealTime()
        if time.hour<10 then
            time.hour="0"..time.hour
        end
        if time.minute<10 then
            time.minute="0"..time.minute
        end
        dxDrawText(time.hour..":"..time.minute1609+149+11789+188+1tocolor(000255), 1.00font"center""center"falsefalsefalsefalsefalse)
        dxDrawText(time.hour..":"..time.minute160949178988tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)
        dxDrawText(getPlayerName(localPlayer).."("..getElementData(localPlayer"id")..")"1473+149+11656+188+1tocolor(000255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        dxDrawText(getPlayerName(localPlayer).."("..getElementData(localPlayer"id")..")"147349165688tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)
        dxDrawText("$ "..getPlayerMoney(localPlayer), 1521+1120+11842+1188+1tocolor(000255), 1.00font3"center""center"falsefalsefalsefalsefalse)
        dxDrawText("#33cc33$#ffffff "..getPlayerMoney(localPlayer), 15211201842188tocolor(255255255255), 1.00font3"center""center"falsefalsefalsetruefalse)
end

font=dxCreateFont("font.ttf",16,false,"antialiased")
font2=dxCreateFont("font.ttf",15,false,"antialiased")
font3=dxCreateFont("font.ttf",14,false,"antialiased")

addEventHandler("onClientResourceStart"resourceRoot, function()
    addEventHandler("onClientRender"rootrender)
    setPlayerHudComponentVisible("all",false)
    setPlayerHudComponentVisible("radar",true)
    setPlayerHudComponentVisible("crosshair",true)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-10-30, 16:57


DaVeCS

Mapper






Wiek: 31
Na forum: 3386 dni
Posty: 193
Nick w MP: DaVe

Piwa: 59

Respekt: 70,5


function convertNumber number )  
    local formatted number  
    while true do      
        formattedstring.gsub(formatted"^(-?%d+)(%d%d%d)"'%1.%2')    
        if ( k==then      
            break   
        end  
    end  
    return formatted
end

function render()


        dxDrawRectangle(14838826721tocolor(000255), false)


        dxDrawRectangle(155211919821tocolor(000255), false)


        dxDrawRectangle(148388267/100*getElementHealth(localPlayer), 21tocolor(24619675255), false)


        if getPedArmor(localPlayer)>0 then


            dxDrawRectangle(1552119198/100*getPedArmor(localPlayer), 21tocolor(255255255255), false)


        end


        dxDrawImage(172418175174"logo.png"000tocolor(255255255255), false)


        dxDrawImage(15371103032"i/armor.png"000tocolor(255255255255), false)


        dxDrawImage(1467793636"i/heart.png"000tocolor(255255255255), false)


        time=getRealTime()


        if time.hour<10 then


            time.hour="0"..time.hour


        end


        if time.minute<10 then


            time.minute="0"..time.minute


        end


        dxDrawText(time.hour..":"..time.minute1609+149+11789+188+1tocolor(000255), 1.00font"center""center"falsefalsefalsefalsefalse)


        dxDrawText(time.hour..":"..time.minute160949178988tocolor(255255255255), 1.00font"center""center"falsefalsefalsefalsefalse)


        dxDrawText(getPlayerName(localPlayer).."("..getElementData(localPlayer"id")..")"1473+149+11656+188+1tocolor(000255), 1.00font2"center""center"falsefalsefalsefalsefalse)


        dxDrawText(getPlayerName(localPlayer).."("..getElementData(localPlayer"id")..")"147349165688tocolor(255255255255), 1.00font2"center""center"falsefalsefalsefalsefalse)


        dxDrawText("$ "..convertNumber(getPlayerMoney(localPlayer)), 1521+1120+11842+1188+1tocolor(000255), 1.00font3"center""center"falsefalsefalsefalsefalse)


        dxDrawText("#33cc33$#ffffff "..convertNumber(getPlayerMoney(localPlayer)), 15211201842188tocolor(255255255255), 1.00font3"center""center"falsefalsefalsetruefalse)


end





font=dxCreateFont("font.ttf",16,false,"antialiased")


font2=dxCreateFont("font.ttf",15,false,"antialiased")


font3=dxCreateFont("font.ttf",14,false,"antialiased")





addEventHandler("onClientResourceStart"resourceRoot, function()


    addEventHandler("onClientRender"rootrender)


    setPlayerHudComponentVisible("all",false)


    setPlayerHudComponentVisible("radar",true)


    setPlayerHudComponentVisible("crosshair",true)


end)






Powinno dzia?a?

Postaw piwo autorowi tego posta
 

 
Tagi: hud :: przecinkami
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Odpowiedz do tematu

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