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

Wysłany: 2018-11-24, 10:54


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3728 dni
Posty: 476
Nick w MP: Rodzaje

Piwa: 878

Respekt: 70,5

Ostrzeżeń: 40%
Wszystko dzia?a na pocz?tku tylko paczki nie mo?na odda? do drugiego markera
addEventHandler("onClientMarkerHit", markerx, function(el, md)

function startjob2()
    if source ~= buttonstart2 then return end
            if getElementData(localPlayer"mamskrzynke") == true 
then outputChatBox("Masz ju? skrzynke!") return end
             losuj math.random 1#markery )
             local markerx createMarker(markery[losuj][1],markery[losuj][2],markery[losuj][3], markery[losuj][4], markery[losuj][5], markery[losuj][6], markery[losuj][7], markery[losuj][8], markery[losuj][9])
             blip createBlipAttachedTo(markerx41)
             setElementData(localPlayer"mamskrzynke"true)
             box createObject(2912000)
             attachElements(boxlocalPlayer00.780.3)
             toggleControl ("sprint"false)
             toggleControl ("jump"false)
             toggleControl ("fire"false)
end
             setPedAnimation(localPlayer"carry""crry_prtial"1falsetrue)
                addEventHandler("onClientMarkerHit"markerx, function(elmd)
                    if localPlayer == el and md then
                    setPedAnimation(localPlayer"CARRY""putdwn", -1truefalsefalse)
                    setTimer(function()
                     setElementData(localPlayer"wezpaczke"false)  
                     setElementData(localPlayer"mamskrzynke"false)
                     destroyElement(markerx)
                     destroyElement(blip)
                     destroyElement(box)
                     toggleControl ("sprint"true)
                     toggleControl ("jump"true)
                     toggleControl ("fire"true)
                     triggerServerEvent("hajs:paczka"localPlayer)
                     setPedAnimation(localPlayer)
                     end10001)
                    end
                    end)


Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 11:09


Query

SyndicateMTA






Wiek: 24
Na forum: 3071 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

Poka? sside

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 11:14


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

Zmienn? markerx zmie? na globaln?

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 11:30


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3728 dni
Posty: 476
Nick w MP: Rodzaje

Piwa: 878

Respekt: 70,5

Ostrzeżeń: 40%
"BarteQ03" napisał/a:

Zmienn? markerx zmie? na globaln?

czyli mam zmieni? tylko nazw? zmiennej ?

Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-24, 11:31


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

usu? local poprostu

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-25, 15:13


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3728 dni
Posty: 476
Nick w MP: Rodzaje

Piwa: 878

Respekt: 70,5

Ostrzeżeń: 40%
nadal to samo

Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-25, 15:33


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Ustawiasz animacj? poza funkcj? wykonuj?c?.
Musisz doda? event we funkcji startjob2, chyba taki przynajmniej mia?e? zamiar.

Spr?buj poni?szy kod.

function startjob2()
    if source ~= buttonstart2 then return end
        if getElementData(localPlayer"mamskrzynke") == true then outputChatBox("Masz ju? skrzynke!") return end
            losuj math.random 1#markery )
            markerx createMarker(markery[losuj][1],markery[losuj][2],markery[losuj][3], markery[losuj][4], markery[losuj][5], markery[losuj][6], markery[losuj][7], markery[losuj][8], markery[losuj][9])
            blip createBlipAttachedTo(markerx41)
            setElementData(localPlayer"mamskrzynke"true)
            box createObject(2912000)
            attachElements(boxlocalPlayer00.780.3)
            toggleControl ("sprint"false)
            toggleControl ("jump"false)
            toggleControl ("fire"false)
            setPedAnimation(localPlayer"carry""crry_prtial"1falsetrue)    
            addEventHandler("onClientMarkerHit"markerx, function(elmd)
                if localPlayer == el and md then
                    setPedAnimation(localPlayer"CARRY""putdwn", -1truefalsefalse)
                    setTimer(function()
                        setElementData(localPlayer"wezpaczke"false)  
                        setElementData(localPlayer"mamskrzynke"false)
                        destroyElement(markerx)
                        destroyElement(blip)
                        destroyElement(box)
                        toggleControl ("sprint"true)
                        toggleControl ("jump"true)
                        toggleControl ("fire"true)
                        triggerServerEvent("hajs:paczka"localPlayer)
                        setPedAnimation(localPlayer)
                    end10001)
                end
            end)             
end    


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
MartinPanZycia
Wysłany: 2018-11-26, 14:25


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3728 dni
Posty: 476
Nick w MP: Rodzaje

Piwa: 878

Respekt: 70,5

Ostrzeżeń: 40%
Dzi?ki pomog?o , w zamian piwo + respekt :)

Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Postaw piwo autorowi tego posta
 

 
Tagi: addeventhandler :: [expected :: element :: argument :: got :: nil]
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