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

Wysłany: 2017-06-23, 12:50


SamsungPLL

Programista lodówek






Wiek: 23
Na forum: 3946 dni
Posty: 123
Nick w MP: SamsungPLL

Piwa: 135

Respekt: 55,3

Witam, chcia?bym zrobi? marker kt?ry teleportuje do wykonanego interioru SAMC
Znajduje on sie w interiorze 112 i dim 666.
Zrobi?em skrypt na teleportacje ale co? nie dzia?a.
Ustawi?em dane kordy w kt?rym znajduje si? zmapowany interior i teleportuje mnie na
podane kordy w skrypcie ale na dim 0 i interior 0 a ja chce na dim 666 i interior 112
Mam wgrana mape z interiorem na dim 666 i interior 112
Prosze o pomoc

M?j wykonany kod na teleportacje:

wyjscie = createMarker (-1618.83, 717.29, 14.37, "arrow", 1.5, 255, 255, 0)
setElementDimension(wyjscie, 0)
setElementInterior(wyjscie, 0)

addEventHandler("onMarkerHit", wyjscie, function(hitElement, md)
if not md then return end
if getElementType(hitElement) == "player" then
if not isPedInVehicle(hitElement) then
    setElementDimension(hitElement, 666)
    setElementInterior(hitElement, 112)
    setElementPosition(hitElement,1558.19, 1627.43, 18.03)
    end
    end
end)



Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-23, 12:57


Jacob

Głupiomądry






Wiek: 28
Na forum: 5643 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

wyjscie = createMarker (-1618.83, 717.29, 14.37, "arrow", 1.5, 255, 255, 0)
setElementDimension(wyjscie, 0)
setElementInterior(wyjscie, 0)

addEventHandler("onMarkerHit", wyjscie, function(hitElement, md)
if not md then return end
if getElementType(hitElement) == "player" then
if not isPedInVehicle(hitElement) then
    setElementDimension(hitElement, 666)
    setElementInterior(hitElement, 112, 1558.19, 1627.43, 18.03)
    end
    end
end)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
SamsungPLL
Wysłany: 2017-06-23, 14:50


Makay

Tryb .lua






Wiek: 26
Na forum: 3429 dni
Posty: 38
Nick w MP: Makay

Piwa: 774

Respekt: 40,5

Ostrzeżeń: 100%
Jacob, Ja co? nie s?dz? aby to dzia?a?o:
setElementInterior(hitElement, 112, 1558.19, 1627.43, 18.03)

Jak ju? to tak:
wyjscie = createMarker (-1618.83, 717.29, 14.37, "arrow", 1.5, 255, 255, 0)
setElementDimension(wyjscie, 0)
setElementInterior(wyjscie, 0)

addEventHandler("onMarkerHit", wyjscie, function(hitElement, md)
if not md then return end
if getElementType(hitElement) == "player" then
if not isPedInVehicle(hitElement) then
    setElementDimension(hitElement, 666)
    setElementInterior(hitElement, 112)
    setElementPosition(hitElement,1558.19, 1627.43, 18.03)
    end
    end
end)


Podpis
Początkowy Programista LUA

[lua]if getElementData(source, "gracz:Makay") then
setPlayerName(source, "Makauś")
else
setPlayerName(source, ".lua")
end[/lua]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-23, 15:04


Atroth







Wiek: 24
Na forum: 3818 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4813

Respekt: 540
Respekt: 540

Makay, Poczytaj sobie wiki
Więcej informacji znajdziesz w Wikipedii MTA:

setElementInterior
. Jacob, dobrze zrobi?.

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-23, 15:14


Makay

Tryb .lua






Wiek: 26
Na forum: 3429 dni
Posty: 38
Nick w MP: Makay

Piwa: 774

Respekt: 40,5

Ostrzeżeń: 100%
Rookspack, Nie wiem nigdy tak nie robi?em zawsze robi?em

Więcej informacji znajdziesz w Wikipedii MTA:

setElementPosition


Podpis
Początkowy Programista LUA

[lua]if getElementData(source, "gracz:Makay") then
setPlayerName(source, "Makauś")
else
setPlayerName(source, ".lua")
end[/lua]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-23, 18:37


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4979 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

Je?eli nie zadzia?a Ci opcja Jacoba, spr?buj zmieni? typ markera na "cylinder", je?eli zadzia?a na cylindrze, to znaczy, ?e musisz ten 'arrow' albo podnie??, albo opu?ci? podczas tworzenia (3 argument w createMarker)

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
SamsungPLL
Wysłany: 2017-06-23, 18:57


SamsungPLL

Programista lodówek






Wiek: 23
Na forum: 3946 dni
Posty: 123
Nick w MP: SamsungPLL

Piwa: 135

Respekt: 55,3

Jacob, dzi?kuje tw?j kod mi zadzia?a?, zostawiam :piwo:
Jurandovsky, dzi?kuje za rade, te? dam :piwo:

Podpis

1000 DNI NA FORUM: 28.09.2018r.
100 POSTÓW NA FORUM: 01.12.2017r.

Postaw piwo autorowi tego posta
 

 
Tagi: teleportacja
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