Wysłany: 2017-08-21, 23:37
Flash.
---
Wiek: 26 Na forum: 3255 dni Posty: 93
Nick w MP: ------
Piwa : 2
Mam tu taki kod
wejscie = createMarker (- 2655.07 , 640.16 , 14.85 + 0.40 , "arrow" , 1.0 , 255 , 0 , 0 )
wyjscie = createMarker ( 1577.6 ,- 2599.2 , 14.3 , "arrow" , 1.0 , 255 , 0 , 0 )
setElementDimension ( wyjscie , 20 )
setElementInterior ( wyjscie , 120 )
addEventHandler ( "onMarkerHit" , wejscie , function( el , md )
if isPedInVehicle ( el ) then return end
setElementDimension ( el , 120 )
setElementInterior ( el , 20 )
setElementPosition ( el , 1577.7 ,- 2601.7 , 13.6 )
end )
addEventHandler ( "onMarkerHit" , wyjscie , function( el , md )
if isPedInVehicle ( el ) then return end
setElementDimension ( el , 0 )
setElementInterior ( el , 0 )
setElementPosition ( el , - 2655.32 , 635.22 , 14.45 )
end )
Potrzebne mi to do interioru bo chc? nagra? pokaz i chc? mie? wej?cie do niego i czy by mi kto? napisa? gdzie s? kordy do wej?cia do interioru/wyj?cia itd rozpisa? bo nie wiem gdzie powkleja? kordy by wszystko dzia?a?o poprawnie. (Te kordy s? od innego interioru).
Wysłany: 2017-08-23, 14:25
l3g3nd4
Mapper & Modeler
Wiek: 22 Na forum: 3399 dni Posty: 156
Nick w MP: l3g3nd4
Piwa : 602
wejscie = createMarker (- 2655.07 -- Koordynaty X , 640.16 -- Koordynaty Y , , 14.85 + 0.40 -- Koordynaty Z , "arrow" -- Marker jako strza ? ka , 1.0 -- Wielko ?? markeru , 255 -- Kolor R , 0 -- Kolor G , 0 -- Kolor B , 0 -- Przezroczysto ??)
wyjscie = createMarker ( 1577.6 ,- 2599.2 , 14.3 , "arrow" , 1.0 , 255 , 0 , 0 ) -- Tworzy marker o podanych koordynatach ( X , Y , Z ).
setElementDimension ( wyjscie , 20 )
setElementInterior ( wyjscie , 120 ) -- Marker wyj ? cia jest w Interiorze 120 , jak chcesz ? eby by ? w 1 , albo 0 to po prostu t ? liczbe zmieniasz .
addEventHandler ( "onMarkerHit" , wejscie , function( el , md )
if isPedInVehicle ( el ) then return end -- Gracz z pojazdem nie mo ? e wej ?? do teleportu .
setElementInterior ( el , 20 ) -- Marker wej ? cia jest w Interiorze 20 , jak chcesz ? eby by ? w normalnym ? wiecie dajesz tu 0.
setElementPosition ( el , 1577.7 ,- 2601.7 , 13.6 ) -- Po wej ? ciu w marker "wejscie" teleportuje gracza na podane koordynaty .
end )
addEventHandler ( "onMarkerHit" , wyjscie , function( el , md )
if isPedInVehicle ( el ) then return end -- Gracz z pojazdem nie mo ? e wej ?? do teleportu .
setElementInterior ( el , 0 ) -- Marker "wyjscie" jest w interiorze 0 , czyli na NORMALNIEJ mapie w MTA .
setElementPosition ( el , - 2655.32 , 635.22 , 14.45 ) -- Po wej ? ciu w marker "wyjscie" , teleportuje nas na podane koordynaty .
end )
Masz tutaj przyk?ad z mojej mapy.
local wejscie = createMarker ( 1414.5999755859 , - 1486.8000488281 , 21 , "arrow" , 1 , 243 , 246 , 22 , 138 )
local wyjscie = createMarker ( 1430.8000488281 , - 1476.4000244141 , 111.19999694824 , "arrow" , 1 , 243 , 246 , 22 , 138 )
function TeleportDoInterioru ( player )
if getElementType ( player )== "player" then
if source == wejscie then
setElementPosition ( player , 1430.8000488281 , - 1477.8000488281 , 110.80000305176 )
setElementInterior ( player , 0 )
setElementInterior ( wyjscie , 0 )
setElementFrozen ( player , true )
setTimer ( setElementFrozen , 1000 , 1 , player , false )
end
end
end
addEventHandler ( "onMarkerHit" , wejscie , TeleportDoInterioru )
function WyjscieZInterioru ( player )
if getElementType ( player )== "player" then
if source == wyjscie then
setElementPosition ( player , 1414.5999755859 , - 1488 , 20.39999961853 )
setElementInterior ( player , 0 )
setElementFrozen ( player , true )
setTimer ( setElementFrozen , 1000 , 1 , player , false )
end
end
end
addEventHandler ( "onMarkerHit" , wyjscie , WyjscieZInterioru )
Podpis
Discord: l3g3nd4#9882
GG: 66391457
Więcej szczegółów
Wystawiono 1 piw(a):Flash.
Tagi: kod :: teleport :: interioru.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: