Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: notyfiakcje
1. notyfiakcje
witam pomoze ktos mi z tymi notyfikacjami storiesrpg na pysa 3.0

StoriesRPG[lua]

local sw,sh=guiGetScreenSize()

function sx(po)
return (po/1680)*sw
end

function sy(po)
return (po/1050)*sh
end

local font=exports["srpg-gui"]:czcionka(sx(11))

local tick=getTickCount()

notyfikacje={}
time_noti=5000



addEventHandler("onClientRender", getRootElement(), function()
for i,v in ipairs(notyfikacje) do
if getTickCount() > v[3]+time_noti then
table.remove(notyfikacje, 1)
end
local offsetY=(sy(78))*(i-1)
dxDrawImage(sx(1287), sy(145)+offsetY, sx(393), sy(73), "i/"..v[1]..".png", 0, 0, 0, tocolor(245, 245, 245, 245), true)
dxDrawText(v[2], sx(1358), sy(145)+(offsetY*2), sx(1680), sy(213), tocolor(255, 255, 255, 255), 1.00, font, "center", "center", false, true, true, false, false)
end
end)

function createAlert(typ,text,_)
if not typ then
typ="info"
end

table.insert(notyfikacje, {typ,text,getTickCount()})
playSound("s/"..typ..".mp3")
outputConsole("["..typ.."] "..text)
if #notyfikacje > 4 then
tick=getTickCount()
table.remove(notyfikacje, 1)
end
end
addEvent("createAlert", true)
addEventHandler("createAlert", root, createAlert)
[/lua]


autobusy [lua]local sw, sh=guiGetScreenSize()
local w, h=(sw/1680), (sh/1050)
local font=dxCreateFont("f.ttf", 1...