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

Wysłany: 2020-06-28, 11:56


IceBrick







Wiek: 26
Na forum: 3541 dni
Posty: 11

Piwa: 1

Respekt: 50

Witam mam problem, gdy? po zrobieniu prawa jazdy nie teleportuje mnie poza plac manewrowy.

function finishLicense(value)
    if isElement(licenseMarker) and licenseMarker then
        destroyElement(licenseMarker)
        licenseMarker=nil
    end
    if isElement(licenseBlip) and licenseBlip then
        destroyElement(licenseBlip)
        licenseBlip=nil
    end
    if value == true then
        licenseCategory=nil
        licenseVehicle=nil
        licenseMarker=nil
        licenseTarget=nil
        licenseBlip=nil
    end
end
addEvent("license:finish",true)
addEventHandler("license:finish"resourceRootfinishLicense)

function showMarker()
    local pos=categoryPositions[licenseCategory][licenseTarget]
    if licenseCategory ~= "L" then
    licenseMarker=createMarker(pos[1], pos[2], pos[3], "checkpoint"1.500255155)
    else
    licenseMarker=createMarker(pos[1], pos[2], pos[3], "ring"3.500255155)
    end
    licenseBlip=createBlip(pos[1], pos[2], pos[3], 01.1502550)
    if categoryPositions[licenseCategory][licenseTarget+1then
          e=categoryPositions[licenseCategory][licenseTarget+1]
        setMarkerTarget(licenseMarkere[1], e[2], e[3])
    end
    addEventHandler("onClientMarkerHit"licenseMarker, function(el,md)
        if not md or el~=localPlayer then return end
        if not getPedOccupiedVehicle(elthen return end
        if licenseTarget #categoryPositions[licenseCategory] then
            --local sound=playSound(":ogrpg-misc/misc/point.wav")
            --setSoundVolume(sound1.0)
            
            finishLicense(false)
            licenseTarget=licenseTarget+1
            showMarker()
        else
            --local sound=playSound(":ogrpg-misc/misc/success.flac")
            --setSoundVolume(sound1.0)

            outputChatBox("* Zda?e?(a?) egzamin. Gratulacje!")
            triggerServerEvent("license:vehdel"resourceRootlicenseVehicle)
            setElementData(localPlayer,"player:license:pj"..licenseCategory1)
            setElementPosition(localPlayer, -2026.79,-97.43,35.16true)
            finishLicense(true)
        end
    end)
end

addEvent("license:start",true)
addEventHandler("license:start"resourceRoot, function(category,vehicle)
    licenseTarget=1
    licenseBlip=nil
    licenseMarker=nil
    licenseCategory=category
    licenseVehicle=vehicle
    showMarker()
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-06-28, 12:12


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4044 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

setElementPosition(localPlayer,-2026.79,-97.43,35.16)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-06-28, 12:27


IceBrick







Wiek: 26
Na forum: 3541 dni
Posty: 11

Piwa: 1

Respekt: 50

po usuni?ciu true nie pojawiaj? si? markery gdzie trzeba jecha?

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: działa :: teleport :: zrobieniu :: prawka
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Nie działa teleport po zrobieniu prawka Odpowiedz do tematu

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