Witam u?ytkownik?w GTAO! Chcia?bym zaprezentowa? wz?r na robienie teleport?w/makrer?w do MTA. Nie widzia?em w og?le ?adnego poradnika jak zrobi? lub samego szablonu nie widzia?em wi?? udost?pniam go wam! :
Jest to tylko info kt?re widzimi w panel admin po najechaniu na skrypt, jest to zb?dne. ?eby po??czyc z map? robimy plik s.lua wpisujemy.
local wejscie = createMarker (x, y, z, "type", r, g, b, a)
local wyjscie = createMarker (x, y, z, "type", r, g, b, a)
setElementInterior(wyjscie, 0)
addEventHandler("onMarkerHit", wejscie, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementPosition(el, x, y, z)
end
end)
addEventHandler("onMarkerHit", wyjscie, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementPosition(el, x, y, z)
end
end)
Sorry nie to poda?em chodzi?o mi o to co da?e? na dole
[ Dodano: 2017-01-26, 11:31 ]
Ale teraz kapn??em si? o to co poda?e? dopisujemy nad to
<script src="s.lua" type="server" />
W mecie mapki
[ Dodano: 2017-01-26, 11:56 ]
Teraz kod wygl?da tak :
local wejscie=createMarker(2594.64722,2790.85791,10.82031, "corona", 1.5, 23,214,255,140)
local wyjscie=createMarker(2899.03662,2891.55518,542.57031, "corona", 1.5, 23,214,255,140)
setElementInterior(wyjscie, 0)
addEventHandler("onMarkerHit", wejscie, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementPosition(el, 2899.03662,2891.55518,542.57031)
end
end)
addEventHandler("onMarkerHit", wyjscie, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementPosition(el, 2594.64722,2790.85791,10.82031)
end
end)
Ale jak mnie tepnie tam gdzie chc? (tam gdzie zbudowa?em co? w mapie) to znowu mmnie tepie w to miejsce gdzie by?em ;-;
[ Dodano: 2017-01-26, 11:57 ]
Znaczy, jak tepi? si? z tamtego miejsca to git dzia?a ale jak chc? wr?ci? to na chwil? tepie i znowu w to miejsce gdzie by?em ;-;
Sorry nie to poda?em chodzi?o mi o to co da?e? na dole
[ Dodano: 2017-01-26, 11:31 ]
Ale teraz kapn??em si? o to co poda?e? dopisujemy nad to
<script src="s.lua" type="server" />
W mecie mapki
[ Dodano: 2017-01-26, 11:56 ]
Teraz kod wygl?da tak :
local wejscie=createMarker(2594.64722,2790.85791,10.82031, "corona", 1.5, 23,214,255,140)
local wyjscie=createMarker(2899.03662,2891.55518,542.57031, "corona", 1.5, 23,214,255,140)
setElementInterior(wyjscie, 0)
addEventHandler("onMarkerHit", wejscie, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementPosition(el, 2899.03662,2891.55518,542.57031)
end
end)
addEventHandler("onMarkerHit", wyjscie, function(el,md)
if getElementType(el) == "player" then
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementPosition(el, 2594.64722,2790.85791,10.82031)
end
end)
Ale jak mnie tepnie tam gdzie chc? (tam gdzie zbudowa?em co? w mapie) to znowu mmnie tepie w to miejsce gdzie by?em ;-;
[ Dodano: 2017-01-26, 11:57 ]
Znaczy, jak tepi? si? z tamtego miejsca to git dzia?a ale jak chc? wr?ci? to na chwil? tepie i znowu w to miejsce gdzie by?em ;-;
Dzieje si? tak, poniewa? tepa Ci? w miejsce gdzie jest marker, kt?ry ponownie Ci? teleportuje. Wystarczy ustawi? miejsce teleportu gdzie indziej ni? marker.
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