local screenW, screenH = guiGetScreenSize()
local marker=createMarker(-2544.27661, -34.97003, 15.46506, "cylinder", 2, 255,255,255,20)
local sx,sy=guiGetScreenSize()
local w, h = (sx/1280),(sy/720)
local scalaczcionki = (w+h)*0.5
local sx, sy = guiGetScreenSize()
local dxfont0_bold = dxCreateFont(":vectory-f1/files/fonts/bold.ttf", (14/1920) * sx)
local dxfont1_light = dxCreateFont(":vectory-f1/files/fonts/light.ttf", (10/1920) * sx)
local screenW, screenH = guiGetScreenSize()
local nazwa = guiGetText(podanaNazwa)
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
function gui()
dxDrawImage(785, 404, 351, 274, ":nrpg_interface/img/white123.png", 0, 0, 0, tocolor(10, 10, 10, 165), false)
dxDrawText("Dyspozytor - SAFD", 888, 411, 1024, 435, tocolor(255, 255, 255, 255), 1.30, "default", "left", "top", false, false, false, false, false)
dxDrawImage(786, 448, 346, 1, ":nrpg_interface/img/1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText("W tym panelu uruchomisz syrene jako cz?onek\n frakcji S.A Fire Departament!", 801, 467, 1016, 600, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, false, false, false)
dxDrawImage(846, 576, 228, 81, ":nrpg_interface/img/white123.png", 0, 0, 0, tocolor(14, 14, 14, 254), false)
if mysz(847, 576, 225, 80) then
dxDrawImage(846, 576, 228, 81, ":nrpg_interface/img/white123.png", 0, 0, 0, tocolor(0, 0, 0, 20), false)
end
dxDrawText("Uruchom Syrene", 861, 600, 1049, 662, tocolor(255, 255, 255, 255), 1.70, "default", "left", "top", false, false, false, false, false)
dxDrawImage(1026, 600, 33, 32, ":nrpg_interface/img/siren.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
function wyl()
dxDrawImage(785, 404, 351, 274, ":nrpg_interface/img/white123.png", 0, 0, 0, tocolor(10, 10, 10, 165), false)
dxDrawText("Dyspozytor - SAFD", 888, 411, 1024, 435, tocolor(255, 255, 255, 255), 1.30, "default", "left", "top", false, false, false, false, false)
dxDrawImage(786, 448, 346, 1, ":nrpg_interface/img/1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText("W tym panelu uruchomisz syrene jako cz?onek\n frakcji S.A Fire Departament!", 801, 467, 1016, 600, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, false, false, false)
dxDrawImage(846, 576, 228, 81, ":nrpg_interface/img/white123.png", 0, 0, 0, tocolor(14, 14, 14, 254), false)
if mysz(847, 576, 225, 80) then
dxDrawImage(846, 576, 228, 81, ":nrpg_interface/img/white123.png", 0, 0, 0, tocolor(0, 0, 0, 20), false)
end
dxDrawText("Wy??cz Syrene", 861, 600, 1049, 662, tocolor(255, 255, 255, 255), 1.70, "default", "left", "top", false, false, false, false, false)
dxDrawImage(1026, 600, 33, 32, ":nrpg_interface/img/siren.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
addEventHandler("onClientMarkerHit", marker, function(el)
gui1 = true
guiSetVisible(podanaNazwa, true)
addEventHandler("onClientRender", root, gui)
showCursor(true, false)
guiSetVisible(podanaNazwa, true)
end)
addEventHandler("onClientMarkerLeave", resourceRoot, function(el)
gui1 = false
if el ~= localPlayer then return end
guiSetVisible(podanaNazwa, false)
removeEventHandler("onClientRender", getRootElement(), gui)
removeEventHandler("onClientRender", getRootElement(), wyl)
showCursor(false)
guiSetVisible(podanaNazwa, false)
end)
function mysz(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
addEventHandler("onClientClick", root, function(btn, state)
if btn == "left" and state == "down" then
if isMouseIn(screenW * 0.4365, screenH * 0.5296, screenW * 0.1271, screenH * 0.0833) and gui1 then
siren = playSound3D( 'http://s2.radioparty.pl:8005/stream', -2544.20117, -35.08395, 16.46683, true )
removeEventHandler("onClientRender", getRootElement(), gui)
gui1 = false
addEventHandler("onClientRender", root, wyl)
gui2 = true
addEventHandler("onClientClick", root, function(btnn, state)
if btnn == "left" and state == "down" then
if isMouseIn(screenW * 0.4365, screenH * 0.5296, screenW * 0.1271, screenH * 0.0833) and gui2 then
stopSound(siren)
removeEventHandler("onClientRender", getRootElement(), wyl)
gui2 = false
addEventHandler("onClientRender", root, gui)
end
end
end)
end
end
end