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

Wysłany: 2017-07-24, 12:47


BoCzKu

Mapper & Lua






Wiek: 25
Na forum: 3606 dni
Posty: 87
Nick w MP: BoKu

Piwa: 331

Respekt: 135
Respekt: 135

Witam, m?g?by mi kto? wyskalowa? GUI na wszystkie rozdzielczo?ci ekranu?


addEventHandler("onClientRender", root,
    function()
        if not getElementData( localPlayer, "skin" ) then return end
        if getElementData( localPlayer, "Jezyk" ) == "Brak" then return end
        local Jezyk = getElementData( localPlayer, "Jezyk" )
        local Nick = getPlayerName( localPlayer )
        local ID = getElementData(localPlayer, "id")
        local Kille = getElementData(localPlayer, "Kills") or 0
        local Ranga = getElementData(localPlayer, "LVL") or 0
        local r, g ,b = getPlayerNametagColor( localPlayer )
   dxDrawRectangle(1091, 629, 271, 105, tocolor(0, 0, 0, 150), false)
        dxDrawText("Zab?jstwa - "..Kille.."", 1094, 641, 1356, 678, tocolor(r, g ,b, 254), 1.00, "bankgothic", "left", "top", false, false, false, false, false)
        dxDrawText(""..Nick.." ["..ID.."]", 1126, 587, 1331, 629, tocolor(r, g ,b, 255), 0.90, "bankgothic", "center", "top", false, false, false, false, false)
        dxDrawText("Ranga - "..Ranga.."", 1094, 689, 1356, 728, tocolor(r, g ,b, 254), 1.00, "bankgothic", "left", "top", false, false, false, false, false)
    end
)



ddEventHandler("onClientRender",root,function ()
    if isPedInVehicle(localPlayer) then
    dxDrawRectangle(0, 716, 280, 52, tocolor(0, 0, 0, 150), false)
        dxDrawText(getVehicleName(getPedOccupiedVehicle(localPlayer)).." | "..math.ceil(getElementSpeed(getPedOccupiedVehicle( localPlayer ),1)).."km/h", 0, 730, 269, 764, tocolor(r,g,b, 255), 0.7, "bankgothic", "center", "top", false, false, false, false, false)    
    end
    end)

Dam Repke i Piwko :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-24, 13:20


Szymczu

Programista bo tak






Wiek: 27
Na forum: 3575 dni
Posty: 194
Nick w MP: Szymczu

Piwa: 36

Respekt: 120
Respekt: 120

W zmiennych screenWW i screenHH to 800 i 600 zamie? na rozdzia?ke w jakiej projektowales to gui

local screenW, screenH = guiGetScreenSize()
local screenWW, screenHH = (screenW/800), (screenH/600)

addEventHandler("onClientRender", root,
    function()
        if not getElementData( localPlayer, "skin" ) then return end
        if getElementData( localPlayer, "Jezyk" ) == "Brak" then return end
        local Jezyk = getElementData( localPlayer, "Jezyk" )
        local Nick = getPlayerName( localPlayer )
        local ID = getElementData(localPlayer, "id")
        local Kille = getElementData(localPlayer, "Kills") or 0
        local Ranga = getElementData(localPlayer, "LVL") or 0
        local r, g ,b = getPlayerNametagColor( localPlayer )
   dxDrawRectangle(1091*screenWW, 629, 271*screenWW, 105, tocolor(0, 0, 0, 150), false)
        dxDrawText("Zab?jstwa - "..Kille.."", 1094*screenWW, 641*screenHH, 1356*screenWW, 678*screenHH, tocolor(r, g ,b, 254), 1.00, "bankgothic", "left", "top", false, false, false, false, false)
        dxDrawText(""..Nick.." ["..ID.."]", 1126*screenWW, 587*screenHH, 1331*screenWW, 629*screenHH, tocolor(r, g ,b, 255), 0.90, "bankgothic", "center", "top", false, false, false, false, false)
        dxDrawText("Ranga - "..Ranga.."", 1094*screenWW, 689*screenHH, 1356*screenWW, 728*screenHH, tocolor(r, g ,b, 254), 1.00, "bankgothic", "left", "top", false, false, false, false, false)
    end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-30, 03:38


BoCzKu

Mapper & Lua






Wiek: 25
Na forum: 3606 dni
Posty: 87
Nick w MP: BoKu

Piwa: 331

Respekt: 135
Respekt: 135

Dzia?a ;) Dzi?kuje za Pomoc.

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: wyskalowanie :: gui
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