Wysłany: 2017-10-24, 22:31
Bolt
Wiek: 24 Na forum: 3206 dni Posty: 9
Nick w MP: Bolt
Piwa : 1
Chcia?bym dowiedzie? si? jak robi si? marker do kt?rego kiedy wchodzimy teleportuje nas do np. komisariatu. Licze na podpowiedzi r?wnie? mile widziany napisany ca?y kod wraz z wyt?umaczeniem jak to dzia?a poniewa? dopiero zaczynam z LUA. Z g?ry dziekuje.
Więcej szczegółów
Wystawiono 1 piw(a):Szymson112
Wysłany: 2017-10-24, 23:35
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
Tworzenie markera
Gdy gracz wejdzie w marker
Strona serwera
Więcej informacji znajdziesz w Wikipedii MTA: OnMarkerHit
Lub strona clienta
i co ma sie wykona? podczas wej?cia w marker
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Więcej szczegółów
Wystawiono 1 piw(a):Bolt
Wysłany: 2017-10-25, 07:50
l3g3nd4
Mapper & Modeler
Wiek: 22 Na forum: 3399 dni Posty: 156
Nick w MP: l3g3nd4
Piwa : 602
?ak tu przyk?adowy kod
local wejscie_glowne = createMarker (- 291.60000610352 , 2721.1000976563 , 64.800003051758 , "arrow" , 1 , 243 , 246 , 22 , 138 ) -- tworzysz marker wej ? cia
local wyjscie_glowne = createMarker (- 292.29998779297 , 2720.3000488281 , 64.800003051758 , "arrow" , 1 , 243 , 246 , 22 , 138 ) -- tworzysz marker wyj ? cia
function TeleportDoInterioru ( player )
if getElementType ( player )== "player" then
if source == wejscie_glowne then
setElementPosition ( player , - 291.20001220703 , 2719.1999511719 , 64.300003051758 ) -- tutaj ustawiasz pozycje gracza , gdzie ma go tepa ?
setElementDimension ( player , 2 ) -- tutaj dimension ( zmieniasz liczbe "2" )
setElementFrozen ( player , true ) -- tutaj chyba nie musz ? nic t ? umaczy ?
setTimer ( setElementFrozen , 1000 , 1 , player , false ) -- i tutaj r ? wnie ? nie musz ? nic t ? umaczy ?
end
end
end
addEventHandler ( "onClientMarkerHit" , wejscie_glowne , TeleportDoInterioru ) -- Tutaj jest Handler po stronie Client 'a wie? w meta.xml dajesz ( np. script src="tp.lua" type="client" />
function WyjscieZInterioru(player)
if getElementType(player)=="player" then
if source == wyjscie_glowne then
setElementPosition(player, -291.60000610352, 2722.5, 64.300003051758)
setElementDimension(player, 0)
setElementFrozen(player, true)
setTimer(setElementFrozen,1000,1,player,false)
end
end
end
addEventHandler("onClientMarkerHit", wyjscie_glowne, WyjscieZInterioru)
Podpis
Discord: l3g3nd4#9882
GG: 66391457
Więcej szczegółów
Wystawiono 1 piw(a):Bolt
Wysłany: 2017-10-25, 08:25
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
"l3g3nd4" napisał/a :?ak tu przyk?adowy kod
local wejscie_glowne = createMarker (- 291.60000610352 , 2721.1000976563 , 64.800003051758 , "arrow" , 1 , 243 , 246 , 22 , 138 ) -- tworzysz marker wej ? cia
local wyjscie_glowne = createMarker (- 292.29998779297 , 2720.3000488281 , 64.800003051758 , "arrow" , 1 , 243 , 246 , 22 , 138 ) -- tworzysz marker wyj ? cia
function TeleportDoInterioru ( player )
if getElementType ( player )== "player" then
if source == wejscie_glowne then
setElementPosition ( player , - 291.20001220703 , 2719.1999511719 , 64.300003051758 ) -- tutaj ustawiasz pozycje gracza , gdzie ma go tepa ?
setElementDimension ( player , 2 ) -- tutaj dimension ( zmieniasz liczbe "2" )
setElementFrozen ( player , true ) -- tutaj chyba nie musz ? nic t ? umaczy ?
setTimer ( setElementFrozen , 1000 , 1 , player , false ) -- i tutaj r ? wnie ? nie musz ? nic t ? umaczy ?
end
end
end
addEventHandler ( "onClientMarkerHit" , wejscie_glowne , TeleportDoInterioru ) -- Tutaj jest Handler po stronie Client 'a wie? w meta.xml dajesz ( np. script src="tp.lua" type="client" />
function WyjscieZInterioru(player)
if getElementType(player)=="player" then
if source == wyjscie_glowne then
setElementPosition(player, -291.60000610352, 2722.5, 64.300003051758)
setElementDimension(player, 0)
setElementFrozen(player, true)
setTimer(setElementFrozen,1000,1,player,false)
end
end
end
addEventHandler("onClientMarkerHit", wyjscie_glowne, WyjscieZInterioru)
Osobi?cie wola?bym u?y? do tego tablicy. Lepiej i szybciej tworzy?o by sie nowe teleporty
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2017-10-25, 14:37
Bolt
Wiek: 24 Na forum: 3206 dni Posty: 9
Nick w MP: Bolt
Piwa : 1
Wysłany: 2017-10-25, 15:38
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Tagi: jak :: zrobić :: marker :: teleportujący :: interioru?
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: