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

Wysłany: 2014-11-26, 16:44


Fanciak

BOT






Wiek: 26
Na forum: 4587 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Da sie aby teleport nie byl do interioru tylko do dimension?


Moj kod:


Kod:


wejscie1 = createMarker ( -1528.28040, 378.04297, 8.68222, "arrow", 1.2, 255, 255, 0, 255 ) --tworzymy wejscie
wyjscie1 = createMarker ( -1531.17261, 387.17001, 8.25354, "arrow", 1.2, 255, 255, 0, 255 ) --tworzymy wyjscie

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

function warpdosklepu11( hitElement, matchingDimension )

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

function warptopoli21(source)
setElementInterior ( source, 0 ) --te miejsce jest w interiorze 1 (w tym przypadku)
setElementPosition ( source, -1528.22693, 380.43143, 7.18750) --kiedy wejdziemy w marker wyjscia, ma nas teleportowac do miejsca, ktore jest tutaj podane
end
addEventHandler( "onMarkerHit", wyjscie0, warptopoli21)



Na dimension 200 chce to zrobic, za pomoc :piwo: i R*

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-26, 16:50


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

zamie? setElementInterior na setElementDimension.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-27, 17:54


Terr9909

Skrypter LUA






Wiek: 27
Na forum: 4375 dni
Posty: 346
Nick w MP: Split

Piwa: 1043

Respekt: 182,8
Respekt: 182,8Respekt: 182,8

Fapaj:
wejscie = createMarker (-1528.28040, 378.04297, 8.68222, "arrow", 1.2, 255, 255, 0)
wyjscie = createMarker (-1531.17261, 387.17001, 8.25354, "arrow", 1.2, 255, 255, 0) -
setElementDimension(wyjscie, 200)

addEventHandler("onMarkerHit", wejscie, function(el, md)
    if isPedInVehicle(el) then return end
    setElementDimension(el, 200)
    setElementPosition(el, -1531.54895, 383.75604, 7.25354)
end)

addEventHandler("onMarkerHit", wyjscie, function(el, md)
    if isPedInVehicle(el) then return end
    setElementDimension(el, 0)
    setElementPosition(el -1528.22693, 380.43143, 7.18750)
end)


Postaw piwo autorowi tego posta
 

 
Tagi: teleport
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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