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

Wysłany: 2018-10-09, 16:45


Pyrek24







Wiek: 26
Na forum: 3579 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

Witam ot?? doda mi kto? do zak?adki pod f1 scrolla do zak?adki aktualizacj? bardzo prosz?, lub tak? strza?k? , jak si? kliknie to na drug? stron? si? przewija
kod
--[[
@StoriesRPG
@Author: Quick <gamesadrian@onet.pl>
@Copryight
@All rights reserved!
]]

local sw, sh=guiGetScreenSize()
local w, h=(sw/1680), (sh/1050)
local font = dxCreateFont("f.ttf", 20*w)
local font2 = dxCreateFont("f.ttf", 10*w)

local tick=getTickCount()
local tick2=getTickCount()

local menuf1=false
local bg=false
local info=false
local pomoc=false
local premium=false
local aktualizacje=false

local updates={}

--[Wypelnienie zakladek]
local infotresc=[[

edsaewsd

]]


local pomoctresc=[[

df112

]]


local premiumtresc=[[

sdadas

]]
local aktualizacjetresc=[[
dsad




]]



--[end:wyeplnieniezakladek]

addEvent("client:showUpdates", true)
addEventHandler("client:showUpdates", root, function(tabelka)
    updates = tabelka
end)


function isMouseIn( x, y, width, height )
    if ( not isCursorShowing( ) ) then
        return false
    end
    local sx, sy = guiGetScreenSize ( )
    local cx, cy = getCursorPosition ( )
    local cx, cy = ( cx * sx ), ( cy * sy )
    if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
        return true
    else
        return false
    end
end


addEventHandler("onClientRender", getRootElement(), function()
    
    if bg then
        exports["srpg-blurr"]:dxDrawBluredRectangle(0, 0, sw, sh, tocolor( 220, 220, 220,  a2), false)
        local a2=interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-tick2)/500, "Linear")
        dxDrawImage(196*w, 144*h, 1280*w, 720*h, "i/background.png", 0, 0, 0, tocolor(255, 255, 255, a2), false)
    end
    
    a = interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount()-tick)/500, "Linear")
    
    if menuf1 then
        

        
        if isMouseIn(459*w, 492*h, 64*w, 132*h) then
            dxDrawImage(459*w, 492*h, 64*w, 132*h, "i/icons/icon_info.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
        else
            dxDrawImage(459*w, 492*h, 64*w, 132*h, "i/icons/icon_info.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
        end
        
        if isMouseIn(656*w, 492*h, 95*w, 132*h) then
            dxDrawImage(656*w, 492*h, 95*w, 132*h, "i/icons/icon_help.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
        else
            dxDrawImage(656*w, 492*h, 95*w, 132*h, "i/icons/icon_help.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
        end
        
        if isMouseIn(882*w, 492*h, 110*w, 128*h) then
            dxDrawImage(882*w, 492*h, 110*w, 128*h, "i/icons/icon_premium.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
        else
            dxDrawImage(882*w, 492*h, 110*w, 128*h, "i/icons/icon_premium.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
        end
        
        if isMouseIn(1106*w, 492*h, 118*w, 122*h) then
            dxDrawImage(1106*w, 492*h, 118*w, 122*h, "i/icons/icon_updates.png", 0, 0, 0, tocolor(255, 255, 255, 200), false)
        else
            dxDrawImage(1106*w, 492*h, 118*w, 122*h, "i/icons/icon_updates.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
        end
        
    
        dxDrawText("Informacje", 415*w, 624*h, 578*w, 664*h, tocolor(255, 255, 255, a), 1.00, font, "center", "center", false, false, false, false, false)
        dxDrawText("Pomoc", 623*w, 624*h, 786*w, 664*h, tocolor(255, 255, 255, a), 1.00,  font, "center", "center", false, false, false, false, false)
        dxDrawText("Premium", 858*w, 620*h, 1021*w, 660*h, tocolor(255, 255, 255, a), 1.00,  font, "center", "center", false, false, false, false, false)
        dxDrawText("Aktualizacje", 1085*w, 614*h, 1248*w, 654*h, tocolor(255, 255, 255, a), 1.00,  font, "center", "center", false, false, false, false, false)
        
    end
    
    if info then 
        dxDrawText(infotresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
        dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
    end
    
    if pomoc then
        dxDrawText(pomoctresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
        dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
    end
    
    if premium then
        dxDrawText(premiumtresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
        dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
    end
    
    if aktualizacje then
            dxDrawText(aktualizacjetresc, 409*w, 427*h, 1268*w, 744*h, tocolor(255, 255, 255, a), 1.00, font2, "center", "top", false, true, false, false, false)
            dxDrawImage(793*w, 784*h, 95*w, 90*h, "i/back.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
        end

    
end)


addEventHandler("onClientClick", getRootElement(), function(btn,state)
    if btn ~= "left" and state ~= "down" then return end
    if isMouseIn(459*w, 492*h, 64*w, 132*h) and menuf1 == true then
        tick=getTickCount()
        menuf1=false
        info=true
        wroc=true
    elseif isMouseIn(656*w, 492*h, 95*w, 132*h) and menuf1 == true then
        tick=getTickCount()
        menuf1=false
        pomoc=true
        wroc=true
    elseif isMouseIn(882*w, 492*h, 110*w, 128*h) and menuf1 == true then
        tick=getTickCount()
        menuf1=false
        premium=true
        wroc=true
    elseif isMouseIn(1106*w, 492*h, 118*w, 122*h) and menuf1 == true then
        tick=getTickCount()
        triggerServerEvent("f1:showUpdates", localPlayer)
        menuf1=false
        aktualizacje=true
        wroc=true
    end
    
    if wroc and btn == "left" and state == "down" then
        if isMouseIn(793*w, 784*h, 95*w, 90*h) then
            tick=getTickCount()
            info=false
            pomoc=false
            premium=false
            aktualizacje=false
            wroc=false
            menuf1=true
        end
    end
end)

bindKey("f1", "down", function()
    if not getElementData(localPlayer,"player:logged") then return end
    if bg == false then
        showChat(false)
        tick=getTickCount()
        tick2=getTickCount()
        bg=true
        menuf1=true
        showCursor(true)
    else
        showChat(true)
        menuf1=false
        wroc=false
        info=false
        pomoc=false
        premium=false
        bg=false
        aktualizacje=false
        showCursor(false)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-11, 17:32


Norbert1234

Nie umiem w LUA






Wiek: 22
Na forum: 4128 dni
Posty: 319
Nick w MP: Gusterowskyy

Piwa: 244

Respekt: 60

No nie, nikt za Ciebie nie b?dzie odwala? takiej roboty. Spr?buj mo?e
Więcej informacji znajdziesz w Wikipedii MTA:

guiCreateScrollBarClient
a mo?e
Więcej informacji znajdziesz w Wikipedii MTA:

guiCreateScrollPane


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-13, 11:59


Mezo.

Mod-Team






Wiek: 25
Na forum: 3352 dni
Posty: 548
Nick w MP: Mezo

Piwa: 6085

Respekt: 517
Respekt: 517

Nadal potrzebujesz pomocy?

Podpis
- Na forum pomagam na miarę swoich możliwości, oraz bezpłatnie.
- Jeżeli potrzebujesz pomocy, pisz do mnie w prywatnej wiadomości, pomoc uzyskasz szybciej.
Współpraca - [email protected]


Użytkownik - 19.08.2017
GTAO MEMBER - 29.03.2019
Support-Team - 03.02.2019 - 07.05.2019
Moderator - 07.05.2019 - 02.08.2020
Mod-Team - 02.08.2020 - 25.03.2022

Postaw piwo autorowi tego posta
 

 
Tagi: scroll
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