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

Wysłany: 2015-12-18, 19:15


Mr.Noboby







Wiek: 24
Na forum: 3831 dni
Posty: 11
Nick w MP: Mr.Noboby



Respekt: 50

Witam,
robi? prac? dorywcz? i chce doda? ?e po wyj?ciu z auta tworzy nam marker z ty?u pojazdu. Oboj?tnie gdzie jest musi by? z ty?u.
Kto? pomo?e?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-18, 19:19


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Funkcje


Więcej informacji znajdziesz w Wikipedii MTA:

AttachElements


Więcej informacji znajdziesz w Wikipedii MTA:

CreateMarker


[ Dodano: 2015-12-18, 19:21 ]
Event


Więcej informacji znajdziesz w Wikipedii MTA:

OnVehicleStartExit

lub

Więcej informacji znajdziesz w Wikipedii MTA:

OnVehicleExit


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-18, 21:52


DamianGames







Wiek: 23
Na forum: 3946 dni
Posty: 75

Piwa: 521

Respekt: 31,5

Ostrzeżeń: 60%


local auto createVehicle 423237.472, -54.2251.5180354.488)

function addHelmetOnEnter thePlayerseatjacked )
    destroyElement(Marker)
    end
end
addEventHandler "onVehicleEnter"getRootElement(), addHelmetOnEnter )
 
function removeHelmetOnExit thePlayerseatjacked )
       local Marker createMarker 000"arrow".7525500170 )
        attachElements (Markerauto40)
    end
end
addEventHandler "onVehicleExit"getRootElement(), removeHelmetOnExit )

Idz na kordy 237.472, -54.225, 1.518 i tam powiniene? mie? auto.
Zobacz czy dzia?a je?eli nie to napisz a je?eli marker si? ?le pojawia zmie? kordy o tutaj attachElements (Marker, auto, 4, 0, 2 ) to ostanie 4, 0, 2 to kordy X, Y, Z.
NIE TESTOWA?EM

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-18, 22:03


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

poprawka @up

local auto createVehicle 423237.472, -54.2251.5180354.488)

function addHelmetOnEnter thePlayerseatjacked )
    destroyElement(Marker)
end
addEventHandler "onVehicleEnter"getRootElement(), addHelmetOnEnter )
 
function removeHelmetOnExit thePlayerseatjacked )
       local Marker createMarker 000"arrow".7525500170 )
        attachElements (Markerauto40)
end
addEventHandler "onVehicleExit"getRootElement(), removeHelmetOnExit )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-19, 10:43


Wittx

8===D






Wiek: 26
Na forum: 4794 dni
Posty: 121
Nick w MP: wittula

Piwa: 1905

Respekt: 120
Respekt: 120

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-20, 10:42


Mr.Noboby







Wiek: 24
Na forum: 3831 dni
Posty: 11
Nick w MP: Mr.Noboby



Respekt: 50

Nie rozumiem tych funkcji m?g?by kto? da? kod taki na test ?eby marker pojawi? si? za baga?nikiem ( z ty?u pojazdu)?
Oczywi?cie lec? piwa dla Pan?w :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-20, 17:35


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

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


marker nil

addEventHandler("onClientVehicleExit"root, function(plrseat)
if seat == 0 then
local x,y,getVehicleComponentPosition(source"boot_dummy""world")
marker createMarker(x,y,z"cylinder"3.025500150)
end
end)

addEventHandler("onClientVehicleEnter"root, function(plrseat)
if seat == 0 then
if marker and isElement(markerthen
destroyElement(marker)
end
end
end)

testuj

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
 

 
Wysłany: 2015-12-21, 15:00


Mr.Noboby







Wiek: 24
Na forum: 3831 dni
Posty: 11
Nick w MP: Mr.Noboby



Respekt: 50

Jurandovsky,

wywala b??d
Kod:

WARNING: test/test.lua:6: Bad argument @ 'createMarker' [Expected vector3 at argument 1, got boolean]


Prosz? o pomoc

Postaw piwo autorowi tego posta
 

 
Tagi: marker :: tyłu :: pojazdu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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