Wysłany: 2016-02-21, 19:27
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
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??.
Wysłany: 2016-02-21, 19:35
mlodasnygo
Wiek: 16 Na forum: 3972 dni Posty: 205
Piwa : 518
Więcej informacji znajdziesz w Wikipedii MTA: setTimer
Je?li co? jeszcze to pisz
Pozdrawiam
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2016-02-21, 20:03
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
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 )
Wysłany: 2016-02-21, 20:06
_Wicek_
Majstersztyk
Wiek: 25 Na forum: 4260 dni Posty: 747
Nick w MP: Wicek
Piwa : 1841
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
Podpis
Support-Team: 25.01.2016
Moderator: 10.07.2016
GG: 51274621
Skype : kuba_wicinski
Wysłany: 2016-02-21, 20:10
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
Wysłany: 2016-02-21, 20:12
_Wicek_
Majstersztyk
Wiek: 25 Na forum: 4260 dni Posty: 747
Nick w MP: Wicek
Piwa : 1841
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
Wysłany: 2016-02-23, 10:33
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
Po wej?ciu i zej?ciu z pojazdu, skuter dalej ma ustawione na respawn, jak to poprawi??
Wysłany: 2016-02-23, 13:53
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
na samej g?rze kodu :
Po zej?ciu :
addEventHandler ( "onVehicleExit" , resourceRoot , function( plr , seat )
if seat == 0 then
timer [ plr ] = setTimer (function( veh , plr )
destroyElement ( veh )
timer [ plr ] = {}
end , 15 * 1000 , 1 , source , plr )
end
end )
Po wej?ciu spowrotem w 15 sekundach na skuter
addEventHandler ( "onVehicleEnter" , resourceRoot , function( plr , seat )
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
Wysłany: 2016-02-24, 11:12
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
Wszystko dzia?a, tylko skutery sie nie respi?.
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
local pojazdyPubliczne = {
{ 462 , 1479.65833 , - 1725.58337 , 13.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 ( pojazd , true )
setElementData ( pojazd , "pojazd_paliwo" , 15 )
setVehicleEngineState ( pojazd , false )
end
addEventHandler ( "onVehicleEnter" , resourceRoot , function( plr , seat )
if seat == 0 then
setElementFrozen ( source , false )
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 ( v ) then
respawnVehicle ( v )
setElementFrozen ( v , true )
setElementData ( v , "pojazd_opis" , "Publiczny" )
setVehicleEngineState ( v , false )
setElementData ( v , "pojazd_paliwo" , 15 )
end
end
end
setTimer ( respawnVehicles , 70000 , 0 )
Edytuj sobi? timer.
Wysłany: 2016-02-26, 15:40
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
marcin778 , nie dzia?a, ale zrobi?em po swojemy. ZAMEK
Tagi: skuterki :: czas
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: