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 )