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

Wysłany: 2018-10-05, 17:30


AkossPL







Wiek: 25
Na forum: 4079 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

Siema nie respi pojazdu w pracy

SERVER:
Pojazdy = {
{-1851.09,-129.32,11.63,0.0,0.2,86.5},
{-1851.18,-134.53,11.63,0.1,359.9,87.2},
{-1851.25,-140.04,11.63,0.1,359.9,86.7},
{-1876.55,-149.54,11.63,0.0,0.0,358.9},
{-1882.07,-149.38,11.63,0.0,0.0,356.6},
}

for i,v in ipairs(Pojazdy) do
    local Pojazd createVehicle(609v[1], v[2], v[3]+0.3v[4], v[5], v[6])
    setElementData(Pojazd"pojazd_opis""Za?adowane Meble : 0%")
    setVehicleColor (Pojazd025584 )
    setVehicleHandling(Pojazd,"maxVelocity",100)
    setElementData(Pojazd"pojazdy_przebieg"math.random(5001000))
    setElementData(Pojazd"pojazdy_paliwo"50)
    setElementFrozen(Pojazdtrue)
    setVehicleEngineState(Pojazdfalse)
end

addEventHandler("onVehicleEnter"resourceRoot, function(plrseat)
    if seat == 0 then
        if getElementData(plr"graczPraca") == false then
            setElementData(plr"graczPraca"true)
            setElementFrozen(sourcefalse)
            outputChatBox("* Rozpocza?e? Prace Jako Kurier Mebli, Jed? Za?adowa? Meble!"plr255255255)
            triggerClientEvent(plr"kurier_praca"resourceRoot)
        else
            outputChatBox("* Posiadasz Ju? Aktywn? Prace!"plr25500)
        end
    end
end)



function respawnVehicles()
    for i,v in ipairs(getElementsByType("vehicle"resourceRoot)) do
        if not getVehicleOccupant(vthen
            respawnVehicle(v)
            setElementFrozen(vtrue)
            setElementData(v"pojazd_opis""Za?adowane Meble : 0%")
            setVehicleColor (v025584 )
            setVehicleHandling(v,"maxVelocity",100)
            setElementData(v"pojazdy_przebieg"math.random(5001000))
            setElementData(v"pojazd_paliwo"50)
            setVehicleEngineState(vfalse)
        end
    end
end
setTimer(respawnVehicles50000)
addEvent("checkCars"true)
addEventHandler("checkCars"resourceRootrespawnVehicles)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-05, 18:22


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Ja?niej prosz? - auta si? tworz? ale potem nie od?wie?aj? si? kiedy nikogo w nich nie ma, tak?
Je?li zgadzasz si? z powy?szym, sprawd? ten kod:

SERVER:

Pojazdy = {
{-1851.09,-129.32,11.63,0.0,0.2,86.5},
{-1851.18,-134.53,11.63,0.1,359.9,87.2},
{-1851.25,-140.04,11.63,0.1,359.9,86.7},
{-1876.55,-149.54,11.63,0.0,0.0,358.9},
{-1882.07,-149.38,11.63,0.0,0.0,356.6},
}

for i,v in ipairs(Pojazdy) do
    local Pojazd createVehicle(609v[1], v[2], v[3]+0.3v[4], v[5], v[6])
    setVehicleRespawnPosition(Pojazdv[1], v[2], v[3]+0.3v[4], v[5], v[6])
    toggleVehicleRespawn(Pojazdtrue)
    setElementData(Pojazd"pojazd_opis""Za?adowane Meble : 0%")
    setVehicleColor (Pojazd025584 )
    setVehicleHandling(Pojazd"maxVelocity"100)
    setElementData(Pojazd"pojazdy_przebieg"math.random(5001000))
    setElementData(Pojazd"pojazdy_paliwo"50)
    setElementFrozen(Pojazdtrue)
    setVehicleEngineState(Pojazdfalse)
end

addEventHandler("onVehicleEnter"resourceRoot, function(plrseat)
    if seat == 0 then
        if getElementData(plr"graczPraca") == false then
            setElementData(plr"graczPraca"true)
            setElementFrozen(sourcefalse)
            outputChatBox("* Rozpocza?e? Prace Jako Kurier Mebli, Jed? Za?adowa? Meble!"plr255255255)
            triggerClientEvent(plr"kurier_praca"resourceRoot)
        else
            outputChatBox("* Posiadasz Ju? Aktywn? Prace!"plr25500)
        end
    end
end)



function respawnVehicles()
    for i,v in ipairs(getElementsByType("vehicle"resourceRoot)) do
        if not getVehicleOccupant(vthen
            respawnVehicle(v)
            setElementFrozen(vtrue)
            setElementData(v"pojazd_opis""Za?adowane Meble : 0%")
            setVehicleColor(v025584)
            setVehicleHandling(v"maxVelocity"100)
            setElementData(v"pojazdy_przebieg"math.random(5001000))
            setElementData(v"pojazd_paliwo"50)
            setVehicleEngineState(vfalse)
        end
    end
end
setTimer(respawnVehicles50000)
addEvent("checkCars"true)
addEventHandler("checkCars"resourceRootrespawnVehicles)


Postaw piwo autorowi tego posta
 

 
Tagi: nie :: respi :: pojazdu :: pracy
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 respi pojazdu w pracy 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