local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
local brama1 = createObject(3089, 1532.5, -1677.5999755859, 9838.900390625, 0, 0, 90)
local brama2 = createObject(3089,x,y,z, 0, 0, 90)
-- 1 Marker
local markerbrama1 = createMarker(1532.10, -1677.82, 9838.55, "cylinder", 0.4, 0, 0, 0, 0)
-- 2 Marker
local markerbrama12 = createMarker(1533.09, -1675.73, 9838.55, "cylinder", 0.4, 0, 0, 0, 0)
function otworzbrama1(thePlayer)
if isElementWithinMarker(thePlayer, markerbrama1) or isElementWithinMarker(thePlayer, markerbrama12) then
if getElementData(thePlayer, "player:duty") == "Policja" then
moveObject ( brama1, 3000, 1532.5, -1679, 9838.900390625 )
moveObject (brama2, 3000, x,y,z ) -- te x,y,z to pozycja bramy otwartej
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
addCommandHandler("ob1", otworzbrama1)