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

Wysłany: 2018-02-16, 19:41


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Witam, mam taki kod ( ni?ej ) i mam z nim problem, jak zrobi?, ?eby attachowa?o mi do podno?nika pojazd z markera o nazwie 'marker1'

function podnies1(hitElementmatchingDimension)
if isElementWithinMarker(hitElement,marker1then
outputChatBox("Pojazd")
    moveObject(pod,10000,x,y,z+1,0,0,0)
    attachElements(hitElement,pod)
    end
end
addEvent"podnies1"true )
addEventHandler"podnies1"marker1podnies1 )


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-16, 19:44


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Powinno dzia?a?.

function podnies1(hitElementmatchingDimension)
    if isElementWithinMarker(hitElement,marker1then
        local pojazd getPedOccupiedVehicle (hitElement)
        if pojazd then
            outputChatBox("Pojazd")
            moveObject (pod,10000,x,y,z+1,0,0,0)
            attachElements (pojazdpod)
        end
    end
end
addEvent"podnies1"true )
addEventHandler"podnies1"marker1podnies1 )

Doda?em tabulacj?, aby kod by? czytelniejszy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-16, 19:47


Axmell

E-Commerce






Wiek: 24
Na forum: 3810 dni
Posty: 279
Nick w MP: %Axmell

Piwa: 224

Respekt: 50

Z?y argument: isElementWithinMarker [expected element at argument 1, got nil]
I chce, aby pojazd m?g? by? podniesione bez gracza w ?rodku

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-16, 19:48


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Poka? wi?cej kodu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-16, 19:49


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

"Axmell" napisał/a:

Z?y argument: isElementWithinMarker [expected element at argument 1, got nil]
I chce, aby pojazd m?g? by? podniesione bez gracza w ?rodku


A, masz ten marker stworzony z nazw? 'marker1'?

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Attach element 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