Wysłany: 2017-05-10, 20:04
Nexisten
Moderator
Wiek: 22 Na forum: 4107 dni Posty: 551
Nick w MP: Nexisten
Piwa : 1479
Cze??
Chcia?bym aby je?li dotkne checkpointa, pojawia? si? drugi, a nie od razu 10.
Wysłany: 2017-05-10, 20:32
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
Kod? Albo dobra
addEventHandler ( "onClientMarketHit" , markerStart ,function( el , md )
marker1 = createMarker (...)
end )
addEventHandler ( "onClientMarketHit" , marker1 ,function( el , md )
marker2 = createMarker (...)
end )
i lecisz
Podpis
"amited" napisał/a :
Wysłany: 2017-05-11, 00:50
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
amited , To jest nie optymalne ani troche...
Robisz tabele z koordami markery = {
{ x , y , z },
{ x , y , z },
}
robisz zmienna np postep
Potem robisz i ta zmienna dodajesz
function next ()
if postep + 1 > #markery then
postep = 0
end
postep = postep + 1
marker = createMarker ( markery [ postep ][ 1 ], markery [ postep ][ 2 ], markery [ postep ][ 3 ], "checkpoint" , 4 , 255 , 255 , 255 , 50 )
end
addEventHandler ( "onClientMarkerHit" , root ,function( he , md )
if he == localPlayer then
if source == marker then
destroyElement ( source )
next ()
end
end
end )
Tagi: funkcja :: markery
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: