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

Wysłany: 2017-08-22, 00:01


mixLoLmix2

Programista






Wiek: 35
Na forum: 4254 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Witam w jaki spos?b zrobi? aby jak pokaze sie 2 razy notyfikacja to aby 2 by?a pod t? 1 Oraz aby po 4 Notyfikacji 5 Pokazywa?a sie jako 1?



function drawMessages()
    if #wiadomosci > 0 then
        for i,v in ipairs( wiadomosci ) do 
            messageNoHex = string.gsub(wiadomosci[i], "#%x%x%x%x%x%x", "")
            
            local czcionka = dxCreateFont("Righteous-Regular.ttf", 15)
    dxDrawLine((screenW * 0.7167) - 1, (screenH * 0.2721) - 1, (screenW * 0.7167) - 1, screenH * 0.3451, tocolor(5, 1, 161, 255), 1, false)
        dxDrawLine(screenW * 0.9824, (screenH * 0.2721) - 1, (screenW * 0.7167) - 1, (screenH * 0.2721) - 1, tocolor(5, 1, 161, 255), 1, false)
        dxDrawLine((screenW * 0.7167) - 1, screenH * 0.3451, screenW * 0.9824, screenH * 0.3451, tocolor(5, 1, 161, 255), 1, false)
        dxDrawLine(screenW * 0.9824, screenH * 0.3451, screenW * 0.9824, (screenH * 0.2721) - 1, tocolor(5, 1, 161, 255), 1, false)
        dxDrawRectangle(screenW * 0.7167, screenH * 0.2721, screenW * 0.2657, screenH * 0.0729, tocolor(0, 0, 0, 153), false)
        dxDrawText(wiadomosci[i], (screenW * 0.7584) - 1, (screenH * 0.2721) - 1, (screenW * 0.9824) - 1, (screenH * 0.3451) - 1, tocolor(0, 0, 0, 255), 1.2, "Righteous-Regular.ttf", "center", "center", false, false, false, false, false)
        dxDrawText(wiadomosci[i], (screenW * 0.7584) + 1, (screenH * 0.2721) - 1, (screenW * 0.9824) + 1, (screenH * 0.3451) - 1, tocolor(0, 0, 0, 255), 1.2, "Righteous-Regular.ttf", "center", "center", false, false, false, false, false)
        dxDrawText(wiadomosci[i], (screenW * 0.7584) - 1, (screenH * 0.2721) + 1, (screenW * 0.9824) - 1, (screenH * 0.3451) + 1, tocolor(0, 0, 0, 255), 1.2, "Righteous-Regular.ttf", "center", "center", false, false, false, false, false)
        dxDrawText(wiadomosci[i], (screenW * 0.7584) + 1, (screenH * 0.2721) + 1, (screenW * 0.9824) + 1, (screenH * 0.3451) + 1, tocolor(0, 0, 0, 255), 1.2, "Righteous-Regular.ttf", "center", "center", false, false, false, false, false)
        dxDrawText(wiadomosci[i], screenW * 0.7584, screenH * 0.2721, screenW * 0.9824, screenH * 0.3451, tocolor(255, 255, 255, 255), 1.2, "Righteous-Regular.ttf", "center", "center", false, false, false, false, false)
        dxDrawImage(screenW * 0.7196, screenH * 0.2773, screenW * 0.0388, screenH * 0.0586, "ptaszek.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
   




    end
    end
end






function outputNotificationBox(message)
        playSoundFrontEnd(idDzwieku);

        if (#wiadomosci == limitWiadomosci) then
            if(boolLimitWiadomosci) then
                table.remove(wiadomosci, #wiadomosci);
            end
        end

        table.insert(wiadomosci, message)

        setTimer ( function()
            table.remove(wiadomosci, ((#wiadomosci + 1) - #wiadomosci));

        end, czasTrwaniaWiadomosci, 1 )
end



function testMessage ( )
    outputNotificationBox("Da?e?/a? Klucze do pojazdu dla\nmixLoLmix");
end

addCommandHandler ( "testmessage", testMessage )

addEvent( "addNotification", true )

addEventHandler( "addNotification", localPlayer, outputNotificationBox )
addEventHandler( "onClientResourceStart", getRootElement( ), checkFont )
addEventHandler( "onClientRender", root, drawMessages )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-22, 02:22


psychol.







Wiek: 23
Na forum: 3643 dni
Posty: 225
Nick w MP: psychol.

Piwa: 3003

Respekt: 244,5
Respekt: 244,5Respekt: 244,5

Jak insertujesz do tabeli? Dajesz sam? wiadomo?? (text) czy ({text})?

Podpis


Postaw piwo autorowi tego posta
 

 
Tagi: notyfikacja
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Notyfikacja 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