function newNoti(el,txt,type)
if el==localPlayer then
if type>3 or type<0 or not tonumber(type) then
type=2
end
local type=types[type][1]
table.insert(msgs,{txt=txt,typ=type,easingFunction="Linear",startTime=getTickCount(),endTime=getTickCount()+5000})
end
end
addCommandHandler("dodaj",function(cmd,typ,...)
local msg=table.concat({...}," ")
newNoti(localPlayer,msg,tonumber(type))
end)
addEventHandler("onClientRender",root,function()
offset=0
for _,v in ipairs(msgs)do
local now = getTickCount()
local elapsedTime = now - v.startTime
local duration = v.endTime - v.startTime
local progress = elapsedTime / duration
local fAnimationTime = getEasingValue(progress, v.easingFunction)