Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- marker = createMarker (-25.58969, 1534.21106, 18.64447, "cylinder", 1, 0, 0, 255)
- mojeW,mojeH = 640, 480
- sW,sH = guiGetScreenSize()
- width, height = (sW/mojeW), (sH/mojeH)
- GUIEditor = {
- button = {}
- }
- addEventHandler("onClientResourceStart", resourceRoot,
- function()
- monitor = guiCreateStaticImage(112*width, 68*height, 426*width, 339*height, "images/monitor.png", false)
- guiSetVisible(monitor, false)
- zamknij = guiCreateButton(283*width, 278*height, 119*width, 29*height, "Zamknij system", false, monitor)
- kamera1 = guiCreateButton(24*width, 63*height, 119*width, 29*height, "Garaż 1", false, monitor)
- monitoring = guiCreateLabel(21*width, 25*height, 203*width, 33*height, "Monitoring:", false, monitor)
- guiSetFont(monitoring, "sa-header")
- guiLabelSetColor(monitoring, 0, 0, 0)
- guiLabelSetHorizontalAlign(monitoring, "left", true)
- kamera2 = guiCreateButton(24*width, 102*height, 119*width, 29*height, "Garaż 2", false, monitor)
- kamera3 = guiCreateButton(24*width, 141*height, 119*width, 29*height, "Garaż 3", false, monitor)
- kamera4 = guiCreateButton(24*width, 180*height, 119*width, 29*height, "Garaż 4", false, monitor)
- kamera5 = guiCreateButton(24*width, 219*height, 119*width, 29*height, "Przed budynkiem", false, monitor)
- kamera6 = guiCreateButton(24*width, 258*height, 119*width, 29*height, "W środku jednostki", false, monitor)
- alarm = guiCreateButton(254*width, 102*height, 119*width, 29*height, "Syrena OSP", false, monitor)
- wezwanie = guiCreateButton(254*width, 141*height, 119*width, 29*height, "Wezwij druhów", false, monitor)
- napisAlarm = guiCreateLabel(231*width, 26*height, 166*width, 32*height, "Alarm:", false, monitor)
- guiSetFont(napisAlarm, "sa-header")
- guiLabelSetColor(napisAlarm, 0, 0, 0)
- guiLabelSetHorizontalAlign(napisAlarm, "left", true)
- wylacz = guiCreateButton(418*width, 403*height, 212*width, 44*height, "Wyłącz podgląd z kamery", false)
- guiSetVisible(wylacz, false)
- wezwij = guiCreateWindow(92*width, 163*height, 470*width, 155*height, "Panel alarmowy Ochotniczej Straży Pożarnej", false)
- guiWindowSetSizable(wezwij, false)
- guiSetAlpha(wezwij, 1.00)
- guiSetVisible(wezwij, false)
- wyslij = guiCreateButton(10*width, 98*height, 185*width, 47*height, "Wyślij", false, wezwij)
- anuluj = guiCreateButton(275*width, 98*height, 185*width, 47*height, "Anuluj", false, wezwij)
- tekst = guiCreateEdit(10*width, 26*height, 450*width, 51*height, "", false, wezwij)
- end
- )
- function otworz ()
- guiSetVisible(monitor, true)
- showCursor(true)
- outputChatBox("Zalogowałeś/-aś się na komputer OSP.")
- end
- addEventHandler("onClientMarkerHit", marker, otworz)
- function zamknij ()
- if source == zamknij then
- guiSetVisible (monitor, false)
- showCursor (false)
- outputChatBox ("Wylogowałeś/-aś się z systemu." )
- end
- end
- addEventHandler("onClientGUIClick", root, zamknij)
- --kamery + off kamer
- function kameraJeden ()
- if source == kamera1 then
- guiSetVisible (monitor, false)
- setCameraMatrix (-114.7031, 1016.1692, 23.8511, -119.90000152588, 1021, 21)
- guiSetVisible (wylacz, true)
- showCursor (true)
- outputChatBox ("**Podgląd z kamery nr 1.")
- end
- end
- addEventHandler("onClientGUIClick", root, kameraJeden)
- function kameraDwa ()
- if source == kamera2 then
- guiSetVisible (monitor, false)
- setCameraMatrix (-114.8578, 1007.6431, 23.9889, -122.59999847412, 1013.0999755859, 20.39999961853)
- guiSetVisible (wylacz, true)
- showCursor (true)
- outputChatBox ("**Podgląd z kamery nr 2.")
- end
- end
- addEventHandler("onClientGUIClick", root, kameraDwa)
- function kameraTrzy ()
- if source == kamera3 then
- guiSetVisible (monitor, false)
- setCameraMatrix (-114.6912, 998.3926, 23.9341, -123.40000152588, 1004.4000244141, 20.39999961853)
- guiSetVisible (wylacz, true)
- showCursor (true)
- outputChatBox ("**Podgląd z kamery nr 3.")
- end
- end
- addEventHandler("onClientGUIClick", root, kameraTrzy)
- function kameraCztery ()
- if source == kamera4 then
- guiSetVisible (monitor, false)
- setCameraMatrix (-115.7143, 989.5533, 23.6280, -124.90000152588, 995.09997558594, 20.39999961853)
- guiSetVisible (wylacz, true)
- showCursor (true)
- outputChatBox ("**Podgląd z kamery nr 4.")
- end
- end
- addEventHandler("onClientGUIClick", root, kameraCztery)
- function kameraPiec ()
- if source == kamera5 then
- guiSetVisible (monitor, false)
- setCameraMatrix (-114.0060, 989.8550, 23.8644, -103.59999847412, 1004.299987793, 19.799999237061)
- guiSetVisible (wylacz, true)
- showCursor (true)
- outputChatBox ("**Podgląd z kamery nr 5.")
- end
- end
- addEventHandler("onClientGUIClick", root, kameraPiec)
- function kameraSzesc ()
- if source == kamera6 then
- guiSetVisible (monitor, false)
- setCameraMatrix (-129.8901, 1023.9247, 27.9543, -122.40000152588, 1018.299987793, 26)
- guiSetVisible (wylacz, true)
- showCursor (true)
- outputChatBox ("**Podgląd z kamery nr 6.")
- end
- end
- addEventHandler("onClientGUIClick", root, kameraSzesc)
- function kameraOff (thePlayer)
- if source == wylacz then
- guiSetVisible (wylacz, false)
- guiSetVisible (monitor, true)
- setCameraTarget ( localPlayer )
- end
- end
- addEventHandler("onClientGUIClick", root, kameraOff)
- --syrena alarmowa OSP
- function syrenaOSP ()
- if source == alarm then
- local syrena = playSound3D("syrena.wav", -25.58969, 1534.21106, 18.64447, false)
- setSoundVolume(syrena,350)
- setSoundMaxDistance(syrena, 450)
- outputChatBox ("Uruchomiłeś syrenę alarmową OSP.")
- end
- end
- addEventHandler("onClientGUIClick", root, syrenaOSP)
- -- panel alarmowy OSP
- function wezwanie ()
- if source == wezwanie then
- guiSetVisible (monitor, false)
- guiSetVisible (wezwij, true)
- showChat(false)
- end
- end
- addEventHandler("onClientGUIClick", root, wezwanie)
- function anulujWezwanie ()
- if source == anuluj then
- guiSetVisible(monitor, true)
- guiSetVisible(wezwij, false)
- showChat(true)
- end
- end
- addEventHandler("onClientGUIClick", root, anulujWezwanie)
- function ST()
- if source == wyslij then
- local text = guiGetText(tekst)
- triggerServerEvent("NAOT", getLocalPlayer(), text)
- showChat(true)
- guiSetVisible(monitor, true)
- guiSetVisible(wezwij, false)
- end
- end
- addEventHandler("onClientGUIClick", root, ST)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement