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

Wysłany: 2018-03-02, 21:43


manieks78

Lua ;)






Wiek: 26
Na forum: 3528 dni
Posty: 97
Nick w MP: Hexan

Piwa: 5

Respekt: 50

Witam, potrzebuj? pomocy, poniewa? robi? skrypt na prawo jazdy i teraz pracuj? nad kursem. Problem jest taki, ?e nie mam zielonego poj?cia jak zrobi? aby markery z tabeli wy?wietla?y si? jeden za drugim, ale dopiero wtedy kiedy wjedzie si? w marker.
Tabela:
points = {{-1521.61023, 1003.14496, 7.18532},
{-1560.43726, 837.22388, 7.03906},
{-1561.52661, 590.91522, 7.03906},
{-1628.99097, 429.42627, 7.03125},
{-1673.31238, 414.60403, 7.17969},
{-1693.16296, 374.47122, 7.03695},
{-1588.55103, 457.94394, 7.03125},
{-1554.33032, 651.47327, 7.03906},
{-1531.14783, 838.57617, 7.03906},
{-1443.48682, 835.42621, 7.18750}}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-02, 21:50


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

addEventHandler("onClientMarkerHit", resourceRoot, function(hit)
    if hit ~= localPlayer then return end
    if source ~= marker then return end
    if getElementDimension(source) ~= getElementDimension(hit) then return end
    if getElementInterior(source) ~= getElementInterior(hit) then return end
    destroyElement(marker)
    marker = false
    punkt = punkt+1
    local x,y,z = points[punkt][1],points[punkt][2],points[punkt][3]
    marker = createMarker(x,y,z,"cylinder",3,0,255,0,75)
end)


Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
manieks78
Wysłany: 2018-03-02, 22:17


manieks78

Lua ;)






Wiek: 26
Na forum: 3528 dni
Posty: 97
Nick w MP: Hexan

Piwa: 5

Respekt: 50

Nie dzia?a, a w db 3 nic nie ma, poka?e ca?y s_side:
points = {{-1521.61023, 1003.14496, 7.18532},
{-1560.43726, 837.22388, 7.03906},
{-1561.52661, 590.91522, 7.03906},
{-1628.99097, 429.42627, 7.03125},
{-1673.31238, 414.60403, 7.17969},
{-1693.16296, 374.47122, 7.03695},
{-1588.55103, 457.94394, 7.03125},
{-1554.33032, 651.47327, 7.03906},
{-1531.14783, 838.57617, 7.03906},
{-1443.48682, 835.42621, 7.18750}}

local marker = createMarker(-1496.81555, 1007.08606, 7.18750,"cylinder",3,0,255,0,75)
setElementVisibleTo(marker, root, false)

addEvent("start", true)
addEventHandler("start", root, function(plr)
    local pojazd = createVehicle( 565, -1433.85352, 1006.91144, 7.18532 )
    setElementInterior(pojazd,0)
    setElementDimension(pojazd,0)
    warpPedIntoVehicle(source, pojazd, 0)
    setElementDimension(source,0)
    setElementInterior(source,0)
end
)

addEventHandler("onClientMarkerHit", resourceRoot, function(hit)
    if hit ~= localPlayer then return end
    if source ~= marker then return end
    if getElementDimension(source) ~= getElementDimension(hit) then return end
    if getElementInterior(source) ~= getElementInterior(hit) then return end
    setElementVisibleTo(marker, hit, true)
    destroyElement(marker)
    marker = false
    punkt = punkt+1
    local x,y,z = points[punkt][1],points[punkt][2],points[punkt][3]
    marker = createMarker(x,y,z,"cylinder",3,0,255,0,75)
end)


Postaw piwo autorowi tego posta
 

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