-- definicja przenosnej strefy bez dm -- jest osobno od reszty gdyz musi byc synchronizowana z reszta graczy local strefa_przenosna1=createColSphere(1083.15,-1775.30,5001.74,2) setElementData(strefa_przenosna1,"strefa",1) setElementData(strefa_przenosna1,"nospawn",1) local function strefaPomoc(plr) outputChatBox("Użyj: /strefa <10-150> - aby zdefiniowac strefe w miejscu w ktorym stoisz", plr) outputChatBox("Lub: /strefa usun - aby ją usunąć", plr) outputChatBox("Lub: /strefa przyklej - aby ją przykleić do siebie - będzie się poruszała wraz z Tobą.", plr) end local function msgToGMS(msg) -- if not (exports["bp-core"]:isRCON(thePlayer)) then -- outputChatBox(msg, thePlayer, 255,100,255, true) triggerClientEvent ( "onAnnouncement2", getRootElement(), msg, 30 ) -- end end addCommandHandler("strefa", function(plr,cmd,argument) if not exports["bp-core"]:isGM(plr) then return end if not argument then strefaPomoc(plr) return end if tonumber(argument) and tonumber(argument)<=150 and tonumber(argument)>=10 then if getElementDimension(plr)>0 or getElementInterior(plr)>0 then outputChatBox("W tym miejscu nie mozna utworzyc przenosnej strefy bez dm.", plr) return end if strefa_przenosna1 and isElement(strefa_przenosna1) then destroyElement(strefa_przenosna1) end local x,y,z=getElementPosition(plr) strefa_przenosna1=createColSphere(x,y,z,argument) setElementData(strefa_przenosna1,"strefa",1) msgToGMS(getPlayerName(plr) .. " zmienił/a położenie przenośnej strefy bez dm") return end if argument=="usun" then if strefa_przenosna1 and isElement(strefa_przenosna1) then destroyElement(strefa_przenosna1) msgToGMS(getPlayerName(plr) .. " usunął/eła przenośną strefę bez dm") else outputChatBox("Obecnie nie ma żadnej przenosnej strefy bez DM", plr) end return end if argument=="przyklej" then if getElementDimension(plr)>0 or getElementInterior(plr)>0 then outputChatBox("W tym miejscu nie mozna utworzyc przenosnej strefy bez dm.", plr) return end if strefa_przenosna1 and isElement(strefa_przenosna1) then attachElements(strefa_przenosna1, plr) msgToGMS(getPlayerName(plr) .. " przykleił/-a przenośną strefę bez DM do siebie.") else outputChatBox("Obecnie nie ma żadnej przenosnej strefy bez DM", plr) end return end strefaPomoc(plr) end,false,false) addEventHandler ( "onVehicleStartEnter", root, function(plr,seat,jacked,door) if not jacked then return end if (getElementData(jacked,"area") or 0) == 1 then outputChatBox("* W wolnej strefie nie mozna krasc pojazdow.", plr, 255,0,0) cancelEvent() end end)