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

Wysłany: 2016-11-13, 21:01


killercycDDS

Migacz






Wiek: 26
Na forum: 4653 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1667

Respekt: 22

Witam mam nast?puj?cy problem. Gdy wchodz? w marker brama si? otwiera ale w nie typowy spos?b czyli kr?ci si? dooko?a i znika pod ziemi?. Tak samo z otwarciem kr?ci si? i zamyka si?. Kordynaty idealnie z bramy s? podane z map editora


local gate={
    -- var
    object=createObject(8229, 1142.3000488281, 1362.5, 12.5, 0, 0, 358.99536132813),
    marker=createMarker(1142.45410, 1364.75916, 10.71795, "cylinder", 9, 0, 0, 0, 0),
    closed=true,
    animation=false,
}

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

    gate.animation=true
    moveObject(gate.object, 5000, 1142.3000488281, 1362.5, -3.2999999523163, 0, 0, 358.99536132813, "OutQuad")
        
    setTimer(function()
        gate.animation=false; gate.closed=false
    end, 6000, 1)
end

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

    gate.animation=true
    moveObject(gate.object, 5000, 1142.3000488281, 1362.5, 12.5, 0, 0, 358.99536132813, "OutQuad")
        
    setTimer(function()
        gate.animation=false; gate.closed=true
    end, 6000, 1)
end

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

    if getElementData(el, 'player:duty')=='TAXI' then
        if gate.animation then
            outputChatBox('* Odczekaj chwile...', el, 255, 0, 0)
            return
        end

        if gate.closed then
            gate.open()

            setTimer(function()
                gate.close()
            end, 8000, 1)
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w Taxi.", el, 255, 0, 0)
    end
end

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


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-11-13, 21:07


Cjalis







Wiek: 35
Na forum: 3684 dni
Posty: 26
Nick w MP: Cejot

Piwa: 36

Respekt: 70


local gate={
    -- var
    object=createObject(8229, 1142.3000488281, 1362.5, 12.5, 0, 0, 358.99536132813),
    marker=createMarker(1142.45410, 1364.75916, 10.71795, "cylinder", 9, 0, 0, 0, 0),
    closed=true,
    animation=false,
}

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

    gate.animation=true
    moveObject(gate.object, 5000, 1142.3000488281, 1362.5, -3.2999999523163, 0, 0, 0, "OutQuad")
        
    setTimer(function()
        gate.animation=false; gate.closed=false
    end, 6000, 1)
end

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

    gate.animation=true
    moveObject(gate.object, 5000, 1142.3000488281, 1362.5, 12.5, 0, 0, 0, "OutQuad")
        
    setTimer(function()
        gate.animation=false; gate.closed=true
    end, 6000, 1)
end

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

    if getElementData(el, 'player:duty')=='TAXI' then
        if gate.animation then
            outputChatBox('* Odczekaj chwile...', el, 255, 0, 0)
            return
        end

        if gate.closed then
            gate.open()

            setTimer(function()
                gate.close()
            end, 8000, 1)
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w Taxi.", el, 255, 0, 0)
    end
end

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

Zobacz

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-11-13, 21:11


killercycDDS

Migacz






Wiek: 26
Na forum: 4653 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1667

Respekt: 22

dzi?ki dzia?a. Co ?le zrobi?em bo chc? wiedzie? na przysz?o??

Postaw piwo autorowi tego posta
 

 
Tagi: brama
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 -,- 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