Mam taki skrypt, kt?ry po wej?ciu do markera i wci?ni?ciu klawisz H powinna si? otworzy? bram ale brama si? nie otwiera. Po wej?ciu do markera napisy si? pojawiaj?. W konsoli nie ma ?adnego b??du.
[code]removeWorldModel(17951, 1000, 2505.52, -1690.99, 14.3281)
--
local brama = createObject(17951, 2505.52, -1690.99, 14.3281, 0, 0, 90)
local marker = createMarker(2508.81836, -1686.99133, 12.56649, "cylinder", 1.5, 255, 255, 0, 150)
local function toggleBrama()
local status = getElementType(brama) == "object" and getElementData(brama, "brama:status") or "closed"
if status == "closed" then
moveObject(brama, 3000, 2505.52, -1690.99, 10.7281, 0, 0, 0)
setElementData(brama, "brama:status", "open")
else
moveObject(brama, 3000, 2505.52, -1690.99, 14.3281, 0, 0, 0)
setElementData(brama, "brama:status", "closed")
end
end
addEventHandler("onMarkerHit", marker, function(hitElement, matchingDimension)
if getElementType(hitElement) == "player" and matchingDimension then
outputChatBox("Wci?nij H, aby otworzy? bram?")
end
end)
addEventHandler("onMarkerLeave", marker, function(hitElement, matchingDimension)
if getElementType(hitElement) == "player" and matchingDimension then
outputChatBox("Opuszczasz marker")
end
end)
addEventHand... |