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

Wysłany: 2016-02-15, 19:48


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam siemka elo mam b?ad z moj? prac? na smieciarki :( A b??d jest w 37 linijce cos z smieciami ;(

local markery = {
{-2216.55,-102.63,35.81},
{-2285.86,32.77,35.31},
{-2195.74,185.86,35.32},
{-1866.60,-139.37,11.90},
{-2288.44,-123.57,35.32},
{-2129.03,253.21,35.42},
{-2079.25,765.95,69.56},
{-2081.60,840.06,69.56},
{-2055.92,1139.46,45.45},
{-1807.47,802.27,27.86},
{-1856.06,585.33,35.16},
{-1823.40,429.99,17.52},
}

local wysypiska = {
{-2077.47,-155.21,35.32},
{-2053.43,-113.47,35.29},
}


addEvent("startSMIECI",true)
addEventHandler("startSMIECI",root,
    function ()
        for i,v in ipairs(markery) do
            local marker createMarker(v[1],v[2],v[3],"checkpoint",4,0,0,255,255)
addEvent("stopSMIECI",true)
addEventHandler("stopSMIECI",root,
    function ()
        destroyElement(marker)
    end
)    
addEventHandler("onClientMarkerHit",marker,
    function ()
        local veh getPedOccupiedVehicle(localPlayer)
        smieci getElementData(veh,"zapelenienie")
        smieci smieci 12
        setElementData(veh,"zapelnienie",smieci)
        setElementData(veh,"pojazd_opis","Zape?nienie: "..smieci.."%")
        destroyElement(source)
    end
)
        end
        for i,v in ipairs(wysypiska) do
            local wysyp createMarker(v[1],v[2],v[3],"checkpoint",4,255,0,0,255)
addEvent("stopSMIECI",true)
addEventHandler("stopSMIECI",root,
    function ()
        destroyElement(wysyp)
    end
)
addEventHandler("onClientMarkerHit",wysyp,
    function ()
    local veh getPedOccupiedVehicle(localPlayer)
    local smieci getElementData(veh,"zapelnienie")
        if (smieci >= 70then
            setElementData(veh,"pojazd_opis","Zape?nienie: 0%")
            setElementData(veh,"zapelnienie",0)
            triggerServerEvent("kasaSMIECIARKI",getRootElement(),localPlayer)
        else
            outputChatBox("Musisz mie? 60% zape?nienia smieci!")
        end        
    end
)
        end
    end
)


Linijka:
smieci smieci 12


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 19:55


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Pewnie nie nadajesz elementDaty "zapelnienie" przy tworzeniu pojazdu. Ustaw elementDate "zapelnienie" na 0 gdy tworzysz pojazd.

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 19:55


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Mam to na s-side ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 19:56


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Na pewno ustawiasz temu pojazdowi na 0 ?

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 19:57


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Tak jasne. Da? ci s-side?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 19:58


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Tak.

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 19:58


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

createBlip(-2048.42,-241.74,35.82,52)

local pojazdy = {
{-2053.92,-234.14,35.87,0,0,0},
{-2053.96,-219.76,35.87,0,0,0},
{-2053.94,-204.04,35.88,0,0,0},
{-2054.04,-189.03,35.88,0,0,0},
{-2054.11,-174.52,35.87,0,0,0},
{-2033.57,-157.97,35.87,0,0,0},
{-2014.34,-128.98,35.82,0,0,180},
{-2014.16,-148.56,35.88,0,0,180},
}

for i,v in ipairs (pojazdy) do
local veh createVehicle(408,v[1],v[2],v[3],v[4],v[5],v[6])
setElementData(veh,"pojazd_paliwo",100)
setElementData(veh,"pojazd_opis","Praca Dorywcza\nSmieciarki")
setElementFrozen(veh,true)
end

addEventHandler("onVehicleStartEnter",resourceRoot,
    function ( player )
        local veh getPedOccupiedVehicle(player)
        setElementData(veh,"pojazd_opis","Zape?nienie: 0%")
        setElementData(veh,"zapelnienie",0)
        triggerClientEvent(player,"startSMIECI",root)
    end
)

addEventHandler("onVehicleStartExit",resourceRoot,
    function ( playerseat )
    if seat == 0 then
        local veh getPedOccupiedVehicle(player)
        triggerClientEvent(player,"stopSMIECI",root)
        setTimer(function()
            respawnVehicle(veh)
            setElementData(veh,"pojazd_opis","Praca Dorywcza\nSmieciarki")
            setElementData(veh,"zapelnienie",0)
        end,2500,1)
    return end
    end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 20:00


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
addEventHandler("onClientMarkerHit",marker,
    function ()
        local veh getPedOccupiedVehicle(localPlayer)
        smieci getElementData(veh,"zapelenienie")
        smieci tonumber(smieci)
        smieci smieci 12
        setElementData(veh,"zapelnienie",smieci)
        setElementData(veh,"pojazd_opis","Zape?nienie: "..smieci.."%")
        destroyElement(source)
    end
)


Spr?buj tak.

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 20:03


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

ten sam b??d w 38 linijce czyli to samo z tymi smieciami ;(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 20:04


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
A jaki jest to b??d ?

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 20:10


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Upload with http://Wrzucajtu.pl

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-15, 20:52


MIKAELmta







Wiek: 24
Na forum: 3978 dni
Posty: 311

Piwa: 10617

Respekt: 355,3
Respekt: 355,3Respekt: 355,3Respekt: 355,3Respekt: 355,3

A tam nie ma przypadkiem liter?wki ? ;)
Zamiast zapelnienie jest zapelEnienie

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-16, 13:52


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Dalej nic ")

Postaw piwo autorowi tego posta
 

 
Tagi: praca :: dorywacza :: smieciarki
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