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: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

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(82291142.30004882811362.512.500358.99536132813),
    marker=createMarker(1142.454101364.7591610.71795"cylinder"90000),
    closed=true,
    animation=false,
}

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

    gate.animation=true
    moveObject(gate.object50001142.30004882811362.5, -3.299999952316300358.99536132813"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.closed=false
    end60001)
end

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

    gate.animation=true
    moveObject(gate.object50001142.30004882811362.512.500358.99536132813"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.closed=true
    end60001)
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...'el25500)
            return
        end

        if gate.closed then
            gate.open()

            setTimer(function()
                gate.close()
            end80001)
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w Taxi."el25500)
    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: 3543 dni
Posty: 26
Nick w MP: Cejot

Piwa: 36

Respekt: 70


local gate={
    -- var
    object=createObject(82291142.30004882811362.512.500358.99536132813),
    marker=createMarker(1142.454101364.7591610.71795"cylinder"90000),
    closed=true,
    animation=false,
}

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

    gate.animation=true
    moveObject(gate.object50001142.30004882811362.5, -3.2999999523163000"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.closed=false
    end60001)
end

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

    gate.animation=true
    moveObject(gate.object50001142.30004882811362.512.5000"OutQuad")
        
    setTimer(function()
        gate.animation=falsegate.closed=true
    end60001)
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...'el25500)
            return
        end

        if gate.closed then
            gate.open()

            setTimer(function()
                gate.close()
            end80001)
        end
    else
        outputChatBox("* Nie jeste? na s?u?bie, lub nie pracujesz w Taxi."el25500)
    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: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

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 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