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

Wysłany: 2014-10-06, 16:46


maxerxxl







Wiek: 31
Na forum: 5209 dni
Posty: 285
Nick w MP: MaXI

Piwa: 38

Respekt: 45,3

Ostrzeżeń: 100%
Witam, kolejny mam problem a tym razem z markerami, po wej?ciu w marker pojawiaj? si? bad argumenty z destroyElement...
A powinien si? tworzy? kolejny marker ale si? nie tworzy.
addEventHandler("onMarkerHit", startMarker, function(el, md)
    if not md or getElementType(el)~="player" or getPedOccupiedVehicle(el) then return end
    local losuj = math.random(1, #Punkty)
    local cel = createMarker(Punkty[losuj][1], Punkty[losuj][2], Punkty[losuj][3], "cylinder", 1, 255, 255, 255)
    local blip = createBlipAttachedTo(cel, 41)
    addEventHandler("onMarkerHit", cel, function(el, md)
        destroyElement(cel)
        destroyElement(blip)
    end)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-06, 17:18


Tostuch







Wiek: 28
Na forum: 5072 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

cel = createMarker(Punkty[losuj][1], Punkty[losuj][2], Punkty[losuj][3], "cylinder", 1, 255, 255, 255)
    blip = createBlipAttachedTo(cel, 41)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-06, 22:19


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4536 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

addEventHandler("onMarkerHit", startMarker, function(el, md)
    if not md or getElementType(el)~="player" or getPedOccupiedVehicle(el) then return end
    local losuj = math.random(1, #Punkty)
    destroyElement ( source )
    local cel = createMarker(Punkty[losuj][1], Punkty[losuj][2], Punkty[losuj][3], "cylinder", 1, 255, 255, 255)
    local blip = createBlipAttachedTo(cel, 41)
end)


Nie pro?ciej?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

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