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

Wysłany: 2016-02-21, 19:27


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Witajcie, oto moje Pytanie:
Jak zrobic skutery, ?e po zejsciu z nich po 15s znikaj?, i pojazwij? sie na ich docelowym "createVechicle"? ??
jak mo?na to prosz? ustawic kolejno??.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-21, 19:35


mlodasnygo







Wiek: 16
Na forum: 3972 dni
Posty: 205

Piwa: 518

Respekt: 161,8
Respekt: 161,8Respekt: 161,8


Więcej informacji znajdziesz w Wikipedii MTA:

onVehicleExit


Więcej informacji znajdziesz w Wikipedii MTA:

setTimer


Je?li co? jeszcze to pisz :)

Pozdrawiam

Podpis
600 dni - 10 marca 2017
:piwo: 500 piw :piwo: - 10 marca 2017
Postaw piwo autorowi tego posta
 

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


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Chcia?em zrobic p?tle, ale mi nie wysz?o
skuteryL = {
{462,-1908.20703125,866.576171875,35.164077758789,0,0,245 },
}

for k,v in ipairs skuteryL) do
createVehicle v[1], root )
end
end)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-21, 20:06


_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%
Jak ju? to tak

skuteryL = {
{462,-1908.20703125,866.576171875,35.164077758789,0,0,245 },
}

for k,v in ipairs (skuteryL) do
createVehicle v[1],v[2]v[3],v[4],v[5],v[6],v[7] )
end


I na respawn pojazd?w


Więcej informacji znajdziesz w Wikipedii MTA:

respawnVehicle


Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

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


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Error expected near V

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-21, 20:12


_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%
Ehhhh.... zjad?em przecinek przez przypadek :)


createVehicle v[1],v[2],v[3],v[4],v[5],v[6],v[7] )


Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-23, 10:33


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Po wej?ciu i zej?ciu z pojazdu, skuter dalej ma ustawione na respawn, jak to poprawi??

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-23, 13:53


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

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

na samej g?rze kodu :

local timer = {}


Po zej?ciu :


addEventHandler("onVehicleExit"resourceRoot, function(plrseat)
if seat == 0 then
  timer[plr] = setTimer(function(vehplr)
   destroyElement(veh)
   timer[plr] = {}
  end15*10001sourceplr)
end
end)


Po wej?ciu spowrotem w 15 sekundach na skuter


addEventHandler("onVehicleEnter"resourceRoot, function(plrseat)
if seat == 0 then
  if isTimer(timer[plr]) then
    killTimer(timer[plr])
    timer[plr] = {}
  end
end
end)


Po wyj?ciu z gry :


addEventHandler("onPlayerQuit"resourceRoot, function()
if isTimer(timer[source]) then
  killTimer(timer[source])
end
timer[source] = {}
end)



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-02-24, 11:12


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Wszystko dzia?a, tylko skutery sie nie respi?.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-25, 22:16


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

local pojazdyPubliczne = {
    {462,  1479.65833, -1725.5833713.54688},
    {462, -2440.48,145.44,34.72,359.5,0.0,176.2},
    {462, -2441.73,145.44,34.72,359.4,360.0,179.7},
    {462, -2442.97,145.44,34.72,359.1,360.0,181.8},
    {481, -2435.08,145.44,34.64,358.6,0.6,177.5},
    {481, -2436.08,145.44,34.64,358.6,360.0,180.4},
    {481, -2437.12,145.44,34.64,359.1,360.0,178.9},
    {481, -2438.08,145.44,34.64,358.6,360.0,179.4},
}

for i,v in ipairs(pojazdyPubliczne) do
    local pojazd createVehicle(v[1], v[2], v[3], v[4], v[5], v[6], v[7])
    setElementData(pojazd"pojazd_opis""Publiczny")
    setElementFrozen(pojazdtrue)
    setElementData(pojazd"pojazd_paliwo"15)
    setVehicleEngineState pojazdfalse )
end

addEventHandler("onVehicleEnter"resourceRoot, function(plrseat)
    if seat == 0 then
        setElementFrozen(sourcefalse)
        setElementData(source"pojazd_opis""Publiczny")
    setElementData(source"pojazd_paliwo"15)
    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""Publiczny")
            setVehicleEngineState vfalse )
            setElementData(v"pojazd_paliwo"15)
        end
    end
end
setTimer(respawnVehicles700000)


Edytuj sobi? timer.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-26, 15:40


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

marcin778, nie dzia?a, ale zrobi?em po swojemy. ZAMEK :D

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: skuterki :: czas
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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