Szerző Téma: Gate System probléma  (Megtekintve 619 alkalommal)

Gate System probléma
« Dátum: 2017. Június 30. - 23:24:46 »
0
Sziasztok! Van egy gate systemem és az a probléma hogy  egyszer felemel egyszer pedig le. Tehát, beirom hogy /fel akkor felemel, utána hogy /le akkor még lemegy, és utána ha ujra beirom hogy /fel már nem megy fel, csak ha restartolom a resourcest.
 
Mi lehet a probléma?
 
 
 
local objGates = createObject(2779, 1775.8000488281, -2059.3999023438, 12.60000038147, 0, 0, 0)
exports.pool:allocateElement(objGates)
 
local open = false
local which = 0
 
-- Gate code
function useSESideGarageGate(thePlayer)
    local x, y, z = getElementPosition(thePlayer)
    local distance1 = getDistanceBetweenPoints3D(1775.8000488281, -2059.3999023438, 12.60000038147, x, y, z)
 
    if (distance1<=10) and (open==false) then
        if (exports.global:hasItem(thePlayer, 108) or exports.global:hasItem(thePlayer, 82)) then
            open = true
            which = 1
            outputChatBox(\"Szerelő lift felemelve!\", thePlayer, 0, 255, 0)
            moveObject(objGates, 1000, 1775.8000488281, -2059.3999023438, 14.5, 0, 0, 0)
        end
    end
end
addCommandHandler(\"fel\", useSESideGarageGate)
 
function closeSESideGarageGate(thePlayer)
    if (which==1) then
        which = 0
        outputChatBox(\"Szerelő lift leengedve!\", thePlayer, 0, 255, 0)
        moveObject(objGates, 1000, 1775.8000488281, -2059.3999023438, 12.60000038147, 0, 0, 0)
    end
end
addCommandHandler(\"le\", closeSESideGarageGate)
 
function resetState7()
    open = false
end
 
 

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal