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

Wysłany: 2013-04-20, 13:30


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

Witam, nie usuwa mi si? static image
destroyElement(item1)


i
        if slot1 then
            item1 guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot1 .. ".png"false)
            addEventHandler("onClientGUIClick"item1,
            function()
                wybranyItem slot1
            end
            )
        end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 13:38


jhomlala

Lua Skrypter






Wiek: 31
Na forum: 5323 dni
Posty: 79
Nick w MP: Oli

Piwa: 42

Respekt: 50

Jedyna mo?liwo?? jaka mog?aby wynika? i? funkcja destroyElement jest wywo?ywana zanim element zacz?? istnie?. Podrzu? logi z /debugscript 3 je?eli wyskakuje co?.

Podpis
Płatny LUA skrypter - wykonam skrypty.
Kontakt 3263073.

http://gtao.pl/%3Cfont-co...lua-vt80146.htm
http://gtao.pl/%3Cfont-co...tki-vt80735.htm
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 13:43


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

No w?a?nie chodzi o to, ?e nic nie wyskakuje ;p (zawsze i to zawsze podaje logi z debuga jak s?)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 14:25


Brzysiek

Skrypter pralek






Wiek: 27
Na forum: 5199 dni
Posty: 488
Nick w MP: Brzysiek

Piwa: 1034

Respekt: 360
Respekt: 360Respekt: 360Respekt: 360Respekt: 360

ja mia?em kiedy? taki problem, ?e nazwy zmiennych kt?re zawiera?y w sobie cyfry nie dzia?a?y.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 14:32


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

To jak ja mam do jasnej anielki odr??ni? pola w ekwipunku, jak nie liczbami :D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 14:37


Brzysiek

Skrypter pralek






Wiek: 27
Na forum: 5199 dni
Posty: 488
Nick w MP: Brzysiek

Piwa: 1034

Respekt: 360
Respekt: 360Respekt: 360Respekt: 360Respekt: 360


local slot = {}

slot[1] = ...

Problem? ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 15:08


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

Nie pomy?la?em xD

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 15:37


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Poczytaj co nieco o tabelach/tablicach/macierzach w programowaniu.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 19:16


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

Zrobi?em tabele i potem zrobi?em tak:
for kitems in ipairs(item) do
destroyElement(items)
end


I dalej nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 20:16


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

Mo?esz pokaza? to co masz przypisane do "item"? (pewno to tablica)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-04-20, 20:20


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

O takie co? ma?ego xD:
        if slot1 then
            item[1] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot1 .. ".png"false)
            addEventHandler("onClientGUIClick"item[1],
            function()
                wybranyItem slot1
            end
            )
        end
        if slot2 then
            item[2] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot2 .. ".png"false)
            addEventHandler("onClientGUIClick"item[2],
            function()
                wybranyItem slot2
            end
            )
        end
        if slot3 then
            item[3] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot3 .. ".png"false)
            addEventHandler("onClientGUIClick"item[3],
            function()
                wybranyItem slot3
            end
            )
        end
        if slot4 then
            item[4] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot4 .. ".png"false)
            addEventHandler("onClientGUIClick"item[4],
            function()
                wybranyItem slot4
            end
            )
        end
        if slot5 then
            item[5] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot5 .. ".png"false)
            addEventHandler("onClientGUIClick"item[5],
            function()
                wybranyItem slot5
            end
            )
        end
        if slot6 then
            item[6] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot6 .. ".png"false)
            addEventHandler("onClientGUIClick"item[6],
            function()
                wybranyItem slot6
            end
            )
        end
        if slot7 then
            item[7] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot7 .. ".png"false)
            addEventHandler("onClientGUIClick"item[7],
            function()
                wybranyItem slot7
            end
            )
        end
        if slot8 then
            item[8] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot8 .. ".png"false)
            addEventHandler("onClientGUIClick"item[8],
            function()
                wybranyItem slot8
            end
            )
        end
        if slot9 then
            item[9] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot9 .. ".png"false)
            addEventHandler("onClientGUIClick"item[9],
            function()
                wybranyItem slot9
            end
            )
        end
        if slot10 then
            item[10] = guiCreateStaticImage(w*0.05/10h*0.1/10w*0.9/10h*0.8/10"Itemy/" .. slot10 .. ".png"false)
            addEventHandler("onClientGUIClick"item[10],
            function()
                wybranyItem slot10
            end
            )
        end


Postaw piwo autorowi tego posta
 

 
Tagi: destroy :: staticimage
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