konoszovsky
Wiek: 24 Na forum: 3080 dni Posty: 33
Nick w MP: konosz615
Piwa : 5
Problem polega na tym, ze jak wgrywam dwie te same syreny dwa te same skrypty ze np marker w 1 skrypcie jest w LV a w drugim skrypcie jest BB to wyswietlaja sie dwa panele, ze i z tego skryptu i z tego
Blad w DB3: Dziwne, przedchwila pokazywalo w DB3 blad, tera nie wykrywa bledu choc jest, ale pamietam co pisalo ze AddEventHandler showGUI cos tam, tutaj daje kodzik: -- Pierwotny w ?& #8218;a?›ciciel i twĂłrca kodu: AmaMa
-- Zakaz uĹĽywania / edycji kodu bez wcze ?& #8250;niejszej zgody ze strony w?‚a?›ciciela
-- Zakaz wykorzystywania ca ?& #8218;ego lub fragmentĂłw kodu
-- W przypadku z ?& #8218;amania powyzszych zasad sprawa zostanie skierowana do s?…du pod zaĹĽutem: Naruszenia maj?…tkowych praw autorskich
-- Pierwotnie pe ?& #8218;ne prawo do uĹĽywania tego kodu posiada tylko AmaMa
mojeW , mojeH = 1360 , 768
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
local wm1 ={
button ={},
}
function gui ()
exports [ "buttons" ]: createCustomWindow ( "Panel alarmowania" , 442 * width , 138 * height , 493 * width , 443 * height , tocolor ( 255 , 255 , 255 , 255 ), false )
exports [ "buttons" ]: createCustomText2 ( "Pami?™taj, ĹĽe naduĹĽywanie syreny b?™dzie karane!" , 675 * width , 455 * height , 693 * width , 55 * height , tocolor ( 255 , 0 , 0 , 255 ), 71 , "default" , "center" , "center" , false , false , false , false , false )
end
wm1 . button [ 1 ]= guiCreateButton ( 0.42 , 0.39 , 0.18 , 0.08 , "Syrena OSP" , true )
wm1 . button [ 2 ]= guiCreateButton ( 0.42 , 0.49 , 0.18 , 0.08 , "Dzwonki w koszarach" , true )
wm1 . button [ 3 ]= guiCreateButton ( 0.42 , 0.59 , 0.18 , 0.08 , "Zamknij" , true )
guiSetVisible ( wm1 . button [ 1 ], false )
guiSetVisible ( wm1 . button [ 2 ], false )
guiSetVisible ( wm1 . button [ 3 ], false )
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , getRootElement (), function()
showCursor ( true , false )
addEventHandler ( "onClientRender" , root , gui )
guiSetVisible ( wm1 . button [ 1 ], true )
guiSetVisible ( wm1 . button [ 2 ], true )
guiSetVisible ( wm1 . button [ 3 ], true )
end )
addEventHandler ( "onClientGUIClick" , resourceRoot , function()
if source == wm1 . button [ 1 ] then
triggerServerEvent ( "playSyrena_s" , localPlayer )
showCursor ( false , false )
removeEventHandler ( "onClientRender" , root , gui )
guiSetVisible ( wm1 . button [ 1 ], false )
guiSetVisible ( wm1 . button [ 2 ], false )
guiSetVisible ( wm1 . button [ 3 ], false )
end
if source == wm1 . button [ 2 ] then
triggerServerEvent ( "playSyrena_s1" , localPlayer )
showCursor ( false , false )
removeEventHandler ( "onClientRender" , root , gui )
guiSetVisible ( wm1 . button [ 1 ], false )
guiSetVisible ( wm1 . button [ 2 ], false )
guiSetVisible ( wm1 . button [ 3 ], false )
end
if source == wm1 . button [ 3 ] then
showCursor ( false , false )
removeEventHandler ( "onClientRender" , root , gui )
guiSetVisible ( wm1 . button [ 1 ], false )
guiSetVisible ( wm1 . button [ 2 ], false )
guiSetVisible ( wm1 . button [ 3 ], false )
end
end )
addEvent ( "playSyrena_c" , true )
addEventHandler ( "playSyrena_c" , getRootElement (), function()
local syrena = playSound3D ( "AsA.mp3" , 1764.02 , 2241.54 , 12.03 , true )
setSoundMaxDistance ( syrena , 200 )
setTimer ( stopSound , 7 * 1000 , 1 , syrena )
end )
addEvent ( "playSyrena_c2" , true )
addEventHandler ( "playSyrena_c2" , getRootElement (), function()
local syrena = playSound3D ( "syrena1.mp3" , 306.22 , - 165.43 , 1.57 , true )
setSoundMaxDistance ( syrena , 1500 )
setTimer ( stopSound , 25 * 1000 , 1 , syrena )
end )