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

Wysłany: 2016-01-28, 12:25


Patrix100

Amator LUA.






Wiek: 26
Na forum: 3887 dni
Posty: 182
Nick w MP: .:Patrix:.

Piwa: 952

Respekt: 40,5

Witam, mam taki kod:

Kod:

wejscie1 = createMarker ( -1605.47, 711.93, 13.87, "arrow", 1.2, 255, 255, 0, 255 ) --tworzymy wejscie
wyjscie1 = createMarker ( -230.58, 1172.47, 57.26, "arrow", 1.2, 255, 255, 0, 255 ) --tworzymy wyjscie

function onstart()
setElementInterior ( wyjscie0, 1 ) --interior, w ktorym jest wyjscie
end
addEventHandler ( "onResourceStart", getRootElement(), onstart )

function warptopoli( hitElement, matchingDimension )

if getElementType(hitElement) == "player" then
if not isPedInVehicle ( hitElement ) then
setElementPosition ( hitElement, -230.58, 1172.47, 57.26) --kiedy wejdziemy w marker wejscia, ma nas teleportowac do miejsca, ktore jest tutaj podane
setElementInterior ( hitElement, 1 ) --te miejsce jest w interiorze 1 (w tym przypadku)
end
end
end
addEventHandler( "onMarkerHit", wejscie1, warptopoli)

function warptokgp(source)
setElementInterior ( source, 1 ) --te miejsce jest w interiorze 1 (w tym przypadku)
setElementPosition ( source, -1605.47, 711.93, 13.87) --kiedy wejdziemy w marker wyjscia, ma nas teleportowac do miejsca, ktore jest tutaj podane
e
addEventHandler( "onMarkerHit", wyjscie0, warptokgp)

I problem jest w tym ?e jak ju? tepne si? z normalnej mapy na interior 1 to w interior 1 nie ma blipu na tepniecie si? na normaln? mape. Pomo?e kto? ;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 12:54


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

po funkcji masz
setElementInterior(wyjscie01)

zamien na
setElementInterior(wyjscie11)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 13:24


Patrix100

Amator LUA.






Wiek: 26
Na forum: 3887 dni
Posty: 182
Nick w MP: .:Patrix:.

Piwa: 952

Respekt: 40,5



Postaw piwo autorowi tego posta
 

 
Tagi: teleport :: interioru
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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