Wysłany: 2017-12-03, 10:07
CjPomarancza
:-)
Wiek: 17 Na forum: 3183 dni Posty: 90
Piwa : 12
Witam. Postanowi?em troch? si? pobawi? j?zykiem lua i bawi? si? r??nymi funkcjami i innymi rzeczami. Ale mam problem.
Ot?? chcia?em zrobi? skrypt, kt?ry teleportuje gracza w pewne miejsce, lecz dopiero, gdy wszed? w inny marker i nada?o mu elementdat?.
Markery si? respi?, ale po wej?ciu w nie nic si? nie dzieje, a db3 nic nie pokazuj?.
Prosz? o wskazanie, co jest nie tak ;-)
http://wklej.org/id/3312154/
Wysłany: 2017-12-03, 10:24
freadyy
uff ya
Wiek: 26 Na forum: 3437 dni Posty: 33
Piwa : 5
local marker1 = createMarker (- 2267.67 , - 198.89 , 35.32 + 1 , "cylinder" , 3 , 255 , 0 , 0 , 100 )
local marker2 = createMarker (- 2036.97 , - 77.77 , 35.32 + 1 , "cylinder" , 3 , 0 , 0 , 255 , 100 )
thePlayer = localPlayer
function dajdate ()
setElementData ( thePlayer , "zaliczony" )
outputChatBox ( "Zaliczy?e? pierwszy checkpoint, id? teraz do drugiego." , source , 255 , 0 , 0 )
end
addEventHandler ( "onPlayerMarkerHit" , marker1 , dajdate )
function tepnij ()
if getElementData ( thePlayer , "zaliczony" ) then
outputChatBox ( "Trwa teleportacja, prosz? czeka?." , 255 , 0 , 0 )
setElementPosition ( thePlayer , - 1969.02 , 148.17 , 36.96 )
setElementInterior ( thePlayer , 0 )
setElementDimension ( thePlayer , 1 )
else
outputChatBox ( "Nie wszed?e? w pierwszy marker, wr?? po niego." , source , 255 , 0 , 0 )
end
end
addEventHandler ( "onPlayerMarkerHit" , marker2 , tepnij )
Prosz? taks?wkarzu, nie testowane.
Tagi: tepanie :: wraz :: elementdatą.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: