bm = createMarker(1544.33,1626.44,10.84, "cylinder", 1.0, 0, 0, 0, 255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d = createObject (1569, 1546.28,1627.42,10.84 0, 0, 0) -- podajesz koordy obiektu
local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
function od ( thePlayer)
if isElementWithinMarker(thePlayer, bm) then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Policja")) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d, 1550.0,1627.52,10.84 ) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
function zd ( thePlayer)
if isElementWithinMarker(thePlayer, bm) then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Policja")) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d, 2500, 1546.12,1627.52,10.84 ) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
addCommandHandler("756djgndng5r54gt7875t54t65bgy45g", od ) -- haslo otwartych drzwi
addCommandHandler("t5gnu4gu54ygvb54vgv45g76y45g6745", zd ) -- haslo zamknietych drzwi
addEventHandler("onPlayerJoin",root,function()
bindKey(source,"mouse_wheel_down","both",animka)
bindKey(source,"mouse_wheel_up","both",animka2)
bindKey(source,"mouse_wheel_down","both",od)
bindKey(source,"mouse_wheel_up","both",zd)
end)