Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2019-01-03, 16:24


Trenor







Wiek: 28
Na forum: 2714 dni
Posty: 6

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
na moim serwerze nie dziala brama
ta pierwsza dziala ale ta druga juz nie(ta druga z dopiskiem 1 nie dziala)

local gate={
    -- var
    object=createObject(9691544.70,-1630.85,12.51,0,0,90),
    marker=createMarker(1544.29,-1626.99,13.38-1"cylinder"90000),
    close=true,
    animation=false,
}

gate.open=function()
    if gate.animation or not gate.close then return end

    gate.animation=true
    moveObject(gate.object50001544.70,-1630.85,9.01,0,0,0"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.close=false
    end60001)
end

gate.close=function()
    if gate.animation or gate.close then return end

    gate.animation=true
    moveObject(gate.object20001544.70,-1630.85,12.51,0,0,0"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.close=true
    end60001)
end
--------------------------------------------------------------------------------------------

local gate1={
    -- var
    object=createObject(9691584.75,-1637.87,12.54),
    marker1=createMarker(1589.04,-1637.47,13.44-1"cylinder"90000)
    close1=true,
    animation1=false,
}

gate1.open=function()
    if gate.animation1 or not gate.close1 then return end

    gate.animation1=true
    moveObject(gate.object50001584.75,-1637.87,8.54"OutQuad")
    setTimer(function()
        gate.animation1=falsegate.close1=false
    end60001)
end

gate1.close=function()
    if gate.animation1 or gate.close1 then return end

    gate.animation1=true
    moveObject(gate.object2000,1584.75,-1637.87,12.54"OutQuad")
        
    setTimer(function()
        gate.animation1=falsegate.close1=true
    end60001)
end



-----------------------------------------------------------------------------------------------------------------------------

gate.toggle=function(el)
    if not el then return end

    if getElementData(el'player:duty')=='SAPD' then
        if gate.animation then
            outputChatBox('* Odczekaj chwile...'el25500)
            return
        end

        if gate.close then
            gate.open()

            setTimer(function()
                gate.close()
            end80001)
        
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w policji."el25500)
    end
end

addEventHandler("onMarkerHit"gate.marker, function(el,md)
    gate.toggle(el)
end)

--------------------------------------------------------------------------------------------------------------------

gate.toggle1=function(el)
    if not el then return end

    if getElementData(el'player:duty')=='SAPD' then
        if gate.animation1 then
            outputChatBox('* Odczekaj chwile...'el25500)
            return
        end

        if gate.close then
            gate.open1()

            setTimer(function()
                gate.close1()
            end80001)
        
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w policji."el25500)
    end
end

addEventHandler("onMarkerHit"gate.marker1, function(el,md)
    gate.toggle1(el)
end)




db3:
s_gate.lua:40'}' expected (to close '{' at line 36near 'close1'


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-01-03, 17:52


Eitho







Wiek: 24
Na forum: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

Zobacz czy dzia?a
local gate={
    -- var
    object=createObject(9691544.70,-1630.85,12.51,0,0,90),
    marker=createMarker(1544.29,-1626.99,13.38-1"cylinder"90000),
    close=true,
    animation=false,
}

gate.open=function()
    if gate.animation or not gate.close then return end

    gate.animation=true
    moveObject(gate.object50001544.70,-1630.85,9.01,0,0,0"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.close=false
    end60001)
end

gate.close=function()
    if gate.animation or gate.close then return end

    gate.animation=true
    moveObject(gate.object20001544.70,-1630.85,12.51,0,0,0"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.close=true
    end60001)
end
--------------------------------------------------------------------------------------------

local gate1={
    -- var
    object=createObject(9691584.75,-1637.87,12.54),
    marker1=createMarker(1589.04,-1637.47,13.44-1"cylinder"90000)
    close1=true,
    animation1=false,
}

gate1.open=function()
    if gate1.animation1 or not gate1.close1 then return end

    gate1.animation1=true
    moveObject(gate1.object50001584.75,-1637.87,8.54"OutQuad")
    setTimer(function()
        gate1.animation1=falsegate1.close1=false
    end60001)
end

gate1.close=function()
    if gate1.animation1 or gate1.close1 then return end

    gate1.animation1=true
    moveObject(gate1.object2000,1584.75,-1637.87,12.54"OutQuad")
        
    setTimer(function()
        gate1.animation1=falsegate1.close1=true
    end60001)
end



-----------------------------------------------------------------------------------------------------------------------------

gate.toggle=function(el)
    if not el then return end

    if getElementData(el'player:duty')=='SAPD' then
        if gate.animation then
            outputChatBox('* Odczekaj chwile...'el25500)
            return
        end

        if gate.close then
            gate.open()

            setTimer(function()
                gate.close()
            end80001)
        
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w policji."el25500)
    end
end

addEventHandler("onMarkerHit"gate.marker, function(el,md)
    gate.toggle(el)
end)

--------------------------------------------------------------------------------------------------------------------

gate1.toggle1=function(el)
    if not el then return end

    if getElementData(el'player:duty')=='SAPD' then
        if gate1.animation1 then
            outputChatBox('* Odczekaj chwile...'el25500)
            return
        end

        if gate1.close then
            gate1.open()

            setTimer(function()
                gate1.close()
            end80001)
        
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w policji."el25500)
    end
end

addEventHandler("onMarkerHit"gate1.marker1, function(el,md)
    gate1.toggle1(el)
end)




Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-01-03, 21:24


Trenor







Wiek: 28
Na forum: 2714 dni
Posty: 6

Piwa: 1

Respekt: 50

Ostrzeżeń: 100%
Eitho,
db3:
s_gate.lua:36'}' expected to close '{' at line 32near 'close1'


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-01-03, 22:23


Eitho







Wiek: 24
Na forum: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

"Trenor" napisał/a:

Eitho,
db3:
s_gate.lua:36'}' expected to close '{' at line 32near 'close1'

marker1=createMarker(1589.04,-1637.47,13.44-1, "cylinder", 9, 0, 0, 0, 0)
tu przecinka na ko?cu brakuje, ale poczekaj chwile bo wydaje mi si?, ?e jeszcze b??dy b?d?

[ Dodano: 2019-01-03, 22:42 ]
local gate={
    -- var
    object=createObject(9691544.70,-1630.85,12.51,0,0,90),
    marker=createMarker(1544.29,-1626.99,13.38-1"cylinder"90000),
    close=true,
    animation=false,
}

gate.open=function()
    if gate.animation or not gate.close then return end

    gate.animation=true
    moveObject(gate.object50001544.70,-1630.85,9.01,0,0,0"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.close=false
    end60001)
end

gate.fclose=function()
    if gate.animation or gate.close then return end

    gate.animation=true
    moveObject(gate.object20001544.70,-1630.85,12.51,0,0,0"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.close=true
    end60001)
end
--------------------------------------------------------------------------------------------

local gate1={
    -- var
    object=createObject(9691584.75,-1637.87,12.54),
    marker1=createMarker(1589.04,-1637.47,13.44-1"cylinder"90000),
    close1=true,
    animation1=false
}

gate1.open=function()
    if gate1.animation1 or not gate1.close1 then return end

    gate1.animation1=true
    moveObject(gate1.object50001584.75,-1637.87,8.54,0,0,0"OutQuad")
    setTimer(function()
        gate1.animation1=falsegate1.close1=false
    end60001)
end

gate1.close=function()
    if gate1.animation1 or gate1.close1 then return end

    gate1.animation1=true
    moveObject(gate1.object2000,1584.75,-1637.87,12.54,0,0,0"OutQuad")
        
    setTimer(function()
        gate1.animation1=falsegate1.close1=true
    end60001)
end



-----------------------------------------------------------------------------------------------------------------------------

gate.toggle=function(el)
    if not el then return end

    if getElementData(el'player:duty')=='SAPD' then
        if gate.animation then
            outputChatBox('* Odczekaj chwile...'el25500)
            return
        end

        if gate.close then
            gate.open()

            setTimer(function()
                gate.fclose()
            end80001)
        
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w policji."el25500)
    end
end

addEventHandler("onMarkerHit"gate.marker, function(el,md)
    gate.toggle(el)
end)

--------------------------------------------------------------------------------------------------------------------

gate1.toggle1=function(el)
    if not el then return end

    if getElementData(el'player:duty')=='SAPD' then
        if gate1.animation1 then
            outputChatBox('* Odczekaj chwile...'el25500)
            return
        end

        if gate1.close then
            gate1.open()

            setTimer(function()
                gate1.close()
            end80001)
        
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w policji."el25500)
    end
end

addEventHandler("onMarkerHit"gate1.marker1, function(el,md)
    gate1.toggle1(el)
end)



Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Tagi: brama :: nie :: dziala
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » brama nie dziala Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku