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

Wysłany: 2016-07-14, 19:28


Shogo12345

LuA






Wiek: 31
Na forum: 4182 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%


local prawko createMarker(-362.63,173.68,1008.38"cylinder"1.025500255setElementDimension(prawko1636)
setElementInterior(prawko3)

local punktyJazdy = {
    {-1881.22,1075.64,44.88},
    {-1879.94,1158.53,44.87},
    {-1953.98,1170.94,44.87},
    {-2066.12,1169.62,46.31},
    {-2149.09,1170.31,55.16},
    {-2271.45,1169.63,55.32},
    {-2458.87,1197.90,34.64},
    {-2551.22,1240.41,34.60},
    {-2616.97,1189.02,34.60},
    {-2744.18,1051.51,48.73},
    {-2748.74,959.01,53.88},
    {-2747.11,877.81,65.76},
    {-2748.02,701.58,40.71},
    {-2742.05,562.50,13.97},
    {-2619.64,562.16,14.03},
    {-2538.05,562.09,14.04},
    {-2401.73,562.44,24.32},
    {-2282.18,561.92,34.59},
    {-2254.37,654.95,48.88},
    {-2251.01,714.64,48.91},
    {-2252.19,795.29,48.88},
    {-2125.80,806.21,68.98},
     {-2014.94,807.74,44.87}, 
     {-1988.56,838.20,44.88},
     {-1894.92,864.58,34.59},
     {-1894.39,951.55,34.60},
     {-1881.46,1047.95,44.88},  
}

function showNextCP(plr)
    local punkt getElementData(plr"egzaminP_postep")
    local ile punktyJazdy[punkt]
    
    if not ile then
        egzaminKoniec(plrtrue)
        return
    end
    
    local marker createMarker(ile[1], ile[2], ile[3], "checkpoint"525500200plr)
    setElementData(plr"egzaminP_marker"marker)
    
    if punktyJazdy[punkt+1then
        ile punktyJazdy[punkt+1]
        setMarkerTarget(markerile[1], ile[2], ile[3])
    end
end

addEventHandler("onMarkerHit"resourceRoot, function(elmd)
    if not isElement(el) or not md or getElementType(el) ~= "player" then return end
    
    if isElementWithinMarker(elprawkothen
        if getElementData(el"gracz_licencja") == 1 then
            exports.notification:showBox(el"info""Posiadasz ju?? prawo jazdy...")
            return
        end
        egzaminStart(el)
        return
    end
    
    if not isElementVisibleTo(sourceelthen return end
    
    local postep getElementData(el"egzaminP_postep")
    if not postep then return end
    
    if not punktyJazdy[postepthen return end
    
    destroyElement(source)
    playSoundFrontEnd(el12)
    
    postep postep+1
    setElementData(el"egzaminP_postep"postep)
    
    showNextCP(el)
    
end)

function egzaminStart(plr)
    setElementInterior(plr0)
    setElementDimension(plr0)
    
    local pojazd createVehicle(589, -1853.79,1043.10,46.09360.0360.0271.3)
    setElementData(pojazd"pojazd_przebieg"math.random(1000020000))
    setElementData(pojazd"pojazd_paliwo"math.random(50,100))
    setElementData(pojazd"pojazd_opis""Egzamin prawa jazdy")
    warpPedIntoVehicle(plrpojazd)
    
    setElementData(plr"egzaminP_postep"1)
    setElementData(plr"egzaminP_vehicle"pojazd)
    
    showNextCP(plr)
    return true
end

function egzaminKoniec(plrudany)
    local pojazd getElementData(plr"egzaminP_vehicle")
    if not pojazd then return end
    
    destroyElement(pojazd)
    removePedFromVehicle(plr)
    removeElementData(plr"egzaminP_marker")
    removeElementData(plr"egzaminP_vehicle")
    
    if getElementData(plr"egzaminP_marker") and isElement(getElementData(plr"egzaminP_marker")) then
        destroyElement(getElementData(plr"egzaminP_marker"))
    end
    
    setElementInterior(plr3)
    setElementDimension(plr1636)
    setElementPosition(plr364.38164.291008.38)

    if udany then
        setElementData(plr"gracz_licencja"1)
        outputChatBox("* Gratulacje! Zda?es egzamin prawa jazdy!"plr)
    end
end

addEventHandler("onVehicleDamage"resourceRoot, function(loss)
    local kierowca getVehicleController(source)
    if not kierowca then return end
    
    local pojazd getElementData(kierowca"egzaminP_vehicle")
    if not pojazd or pojazd ~= source then return end
    
    if loss 5 then
        egzaminKoniec(kierowcafalse)
        outputChatBox("* Uszkodziles pojazd! Koniec egzaminu!"kierowca25500)
    end
end)

addEventHandler("onPlayerWasted"root, function()
    local pojazd getElementData(source"egzaminP_vehicle")
    if not pojazd then return end
    
    destroyElement(pojazd)
    
    if getElementData(source"egzaminP_marker") and isElement(getElementData(source"egzaminP_marker")) then
        destroyElement(getElementData(source"egzaminP_marker"))
    end
end)

addEventHandler("onPlayerQuit"root, function()
    local pojazd getElementData(source"egzaminP_vehicle")
    if not pojazd then return end
    
    destroyElement(pojazd)
    
    if getElementData(source"egzaminP_marker") and isElement(getElementData(source"egzaminP_marker")) then
        destroyElement(getElementData(source"egzaminP_marker"))
    end
end)

addEventHandler("onVehicleStartExit"resourceRoot, function()
  cancelEvent()
end)

Nie pokazuje mi markera.

Ostatnio zmieniony przez Shogo12345 2016-07-15, 14:24, w całości zmieniany 3 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 19:29


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Jeste? na dimensionie 1636 i interiorze nr 3?

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 19:33


Shogo12345

LuA






Wiek: 31
Na forum: 4182 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%
Tak

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 22:30


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

local prawko createMarker(-362.63,173.68,1008.38"cylinder"1.025500255


Testuj

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 22:32


GabWas







Wiek: 24
Na forum: 3881 dni
Posty: 289
Nick w MP: GabWas

Piwa: 65

Respekt: 231,5
Respekt: 231,5Respekt: 231,5

Mi si? wydaj?, ?e albo numer dimension'a jest zbyt du?y, b?d? te? wysoko?? markera (pozycja Z).

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 12:19


Shogo12345

LuA






Wiek: 31
Na forum: 4182 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%
Dalej nie dzia?a dlatego podaje b?edy debugscript

http://screenshot.sh/n7WBgQZ0XlvpW

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 13:03


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Ustaw kodowanie zasobu na UTF-8.

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 14:16


Shogo12345

LuA






Wiek: 31
Na forum: 4182 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%
Ustawi?em ale i tak dalej nie dzia?a a do tego jeszcze nie pokazuje b?ed?w w debugscript 3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-16, 09:19


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

Na pewno jeste? w interiorze 3 i dimensionie 1636 na pozycji: -362.63,173.68,1008.38 ??

W ogole dziwne, 1KM nad ziemi? :O

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-16, 11:37


Shogo12345

LuA






Wiek: 31
Na forum: 4182 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%
Tak Jestem.

[ Dodano: 2016-07-17, 11:48 ]
Prosze o pomoc bo dalej mi nie pokazuje tego markera.

[ Dodano: 2016-07-18, 13:15 ]
Temat do Zamkniecia,Naprawi?em sam :)

Postaw piwo autorowi tego posta
 

 
Tagi: prawojazdy
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » PrawoJazdy 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