AsterBonzo
Otwórz ogień
Wiek: 20 Na forum: 2968 dni Posty: 187
Nick w MP: Hirahi
Piwa : 60
Witam mam problem chce doda? do notyfikacji ?eby da?o si? napisa? kategorie tego jak? si? napisze np
triggerEvent ( "create:noti" , localPlayer , "Nie masz tyle pini?dzy" , "Sklep" )
kod
--[[
Zas ? b zosta ? stworzony przez : boszboszek
Korzystanie z pliku bez mojej zgody jest zabronione .
@ Skype : masteradolf1
@ E - mail : ptotczyk @ gmail . com
]]--
local sx , sy = guiGetScreenSize ()
local zoom = 1
local fh = 1920
if sx < fh then
zoom = math . min ( 2 , fh / sx )
end
local font1 = dxCreateFont ( "font1.ttf" , 15 )
noti ={}
noti_time = 10000
addEventHandler ( "onClientRender" , getRootElement (),function()
for k , v in ipairs ( noti ) do
if getTickCount () > v [ 2 ]+ noti_time then
table . remove ( noti , 1 )
end
local screenX = ( 120 / zoom )*( k - 1 )
dxDrawImage ( 30 / zoom , 675 / zoom - screenX , 400 / zoom , 120 / zoom , "noti.png" , 0 , 0 , 0 , tocolor ( 0 , 0 , 0 , 140 ), false )
dxDrawImage ( 45 / zoom , 690 / zoom - screenX , 25 / zoom , 25 / zoom , "info_circle.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 140 ), false )
dxDrawText ( v [ 1 ], 45 / zoom , 715 / zoom - screenX , 400 / zoom , 130 / zoom , tocolor ( 255 , 255 , 255 , 180 ), 1 / zoom , font1 , left , top , false , true )
dxDrawText ( v [ 2 ], 75 / zoom , 690 / zoom - screenX , 400 / zoom , 130 / zoom , tocolor ( 255 , 255 , 255 , 180 ), 1 / zoom , font1 , left , top , false , true )
end
end )
function createAlert ( _ , text )
playSound ( "noti_sound.mp3" )
table . insert ( noti , { text , getTickCount ()})
if #noti > 3 then
table . remove ( noti , 1 )
end
end
addEvent ( "create:noti" , true )
addEventHandler ( "create:noti" , getRootElement (),function( text )
createAlert ( _ , text )
end )
Gdy doda?em to zamiast tego co chce s? jakie? liczby nie wiem jak to naprawi?
Podpis
Pomagam jak potrafię