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

Wysłany: 2014-10-11, 12:01


VistoR







Wiek: 27
Na forum: 4811 dni
Posty: 11
Nick w MP: VistoR

Piwa: 1

Respekt: 50

Dlaczego teleportuje tez auto ?

Kod:

function teleport(player)
Teleport1 = createMarker ( -2719.2998046875, -319.2001953125, 7, "cylinder", 1, 0, 0, 255, 255, getRootElement() )
createBlipAttachedTo ( Teleport1, 19 )

function MarkerHit( player, matchingDimension, interior )
setElementPosition ( player, 378.10000610352, 173.80000305176, 1008 )
outputChatBox ( "#00FF00**Witam w urzedzie**", getRootElement(), 255, 255, 255, true )
setElementDimension ( player, 0 )
setElementInterior ( player, 3 )
setElementRotation( player, 0, 0, 276.53833007813)

end
addEventHandler( "onMarkerHit", Teleport1, MarkerHit )

end
addEventHandler ( "onResourceStart", getRootElement (), teleport )


function teleport()
Teleport2 = createMarker ( 390, 173.7001953125, 1007.4, "cylinder", 1, 0, 255, 255, 255, getRootElement() )
setElementDimension ( Teleport2, 0 )
setElementInterior ( Teleport2, 3 )

function MarkerHit( player, matchingDimension )
setElementPosition ( player, -2721.3000488281, -317.29998779297, 6.5 )
outputChatBox ( "#00FF00**Witamy w San Fierro**.", getRootElement(), 255, 255, 255, true )
setElementDimension ( player, 0 )
setElementInterior ( player, 0 )
setElementRotation( player, 0, 0, 6.5342407226563)
end
addEventHandler( "onMarkerHit", Teleport2, MarkerHit )

end
addEventHandler ( "onResourceStart", getRootElement (), teleport )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 12:03


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

Sprawdzaj, czy 'player' to gracz, je?eli tak to przeno?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 12:07


VistoR







Wiek: 27
Na forum: 4811 dni
Posty: 11
Nick w MP: VistoR

Piwa: 1

Respekt: 50

Tzn? Niby jest ok ale przenosi te? auto. A nwm gdzie jest blad

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 12:13


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3


function (...)
    if getElementType(player) == "player" then
        -- przenosisz gracza
    end
end 


Masz podany przyk?ad, musisz wdro?y? go do swojego kodu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 12:18


VistoR







Wiek: 27
Na forum: 4811 dni
Posty: 11
Nick w MP: VistoR

Piwa: 1

Respekt: 50

Byle gdzie to strzeli?? Wystarczy pod wszystkim ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 12:19


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

W funkcji, w kt?rej przenosi? chcesz gracza. Tej, kt?ra wywo?uje si? po wej?ciu w marker.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 12:48


VistoR







Wiek: 27
Na forum: 4811 dni
Posty: 11
Nick w MP: VistoR

Piwa: 1

Respekt: 50

Nadal z autem przenosi. A dok?adniej motorem w to wje?d?am.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 13:07


xBolekk







Wiek: 24
Na forum: 4474 dni
Posty: 113
Nick w MP: Bolek.

Piwa: 190

Respekt: 60

if getElementType(hitElement) == "player" then
if not isPedInVehicle hitElement then


Wklej to do funkcji, kt?ra teleportuje gracza.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 13:29


VistoR







Wiek: 27
Na forum: 4811 dni
Posty: 11
Nick w MP: VistoR

Piwa: 1

Respekt: 50

Wklei?em, i nadal to samo tepa z pojazdem

Kod:

function teleport(player)
Teleport1 = createMarker ( -2719.2998046875, -319.2001953125, 7, "cylinder", 1, 0, 0, 255, 255, getRootElement() )
createBlipAttachedTo ( Teleport1, 19 )

function MarkerHit( player, matchingDimension, interior )
setElementPosition ( player, 378.10000610352, 173.80000305176, 1008 )
outputChatBox ( "#00FF00**Witam w urzedzie**", getRootElement(), 255, 255, 255, true )
setElementDimension ( player, 0 )
setElementInterior ( player, 3 )
setElementRotation( player, 0, 0, 276.53833007813)
if getElementType(hitElement) == "player" then
if not isPedInVehicle ( hitElement ) then
end
end
end
addEventHandler( "onMarkerHit", Teleport1, MarkerHit )

end
addEventHandler ( "onResourceStart", getRootElement (), teleport )


function teleport()
Teleport2 = createMarker ( 390, 173.7001953125, 1007.4, "cylinder", 1, 0, 255, 255, 255, getRootElement() )
setElementDimension ( Teleport2, 0 )
setElementInterior ( Teleport2, 3 )

function MarkerHit( player, matchingDimension )
setElementPosition ( player, -2721.3000488281, -317.29998779297, 6.5 )
outputChatBox ( "#00FF00**Witamy w San Fierro**.", getRootElement(), 255, 255, 255, true )
setElementDimension ( player, 0 )
setElementInterior ( player, 0 )
setElementRotation( player, 0, 0, 6.5342407226563)
end
addEventHandler( "onMarkerHit", Teleport2, MarkerHit )

end
addEventHandler ( "onResourceStart", getRootElement (), teleport )


[ Dodano: 2014-10-12, 17:29 ]
Co robie nie tak ? :o

Postaw piwo autorowi tego posta
 

 
Tagi: marker
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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