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

Wysłany: 2017-03-06, 16:25


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

addEvent("pokazPanelTuningu"true)
addEventHandler("pokazPanelTuningu"localPlayer, function(veh)
    if not isElement(GUIEditor.window[1]) then
        if getElementData(veh"vehicle:spawn"then
            showCursor(true)
            veh1 veh
            setElementData(localPlayer"tune:car"veh)
            local screenWscreenH guiGetScreenSize()
            GUIEditor.window[1] = guiCreateWindow((screenW 888) / 2, (screenH 546) / 2888*width546*height"---=== Tuningowanie pojazdu ===---"false)
            guiWindowSetSizable(GUIEditor.window[1], false)
            GUIEditor.button[1] = guiCreateButton(445*width484*height233*width52*height"TUNINGUJ\nDEMONTUJ"falseGUIEditor.window[1])
            guiSetProperty(GUIEditor.button[1], "NormalTextColour""FFAAAAAA")
            GUIEditor.button[2] = guiCreateButton(212*width484*height233*width52*height"ZAMKNIJ OKNO"falseGUIEditor.window[1])
            guiSetProperty(GUIEditor.button[2], "NormalTextColour""FFAAAAAA")
            GUIEditor.gridlist[1] = guiCreateGridList(31*width41*height827*width390*heightfalseGUIEditor.window[1])
            guiGridListAddColumn(GUIEditor.gridlist[1], "ID CZESCI"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "TYP"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "AKCJA"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "KOSZT CZESCI"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "NAZWA Czesci"0.15)
        --    a=0
            for i=0,16 do
                if getVehicleUpgradeOnSlot(vehi) ~= 0 then
                    local a guiGridListAddRow(GUIEditor.gridlist[1])
                    guiGridListSetItemText(GUIEditor.gridlist[1], a1tostring(getVehicleUpgradeOnSlot(vehi)), falsefalse)
                    guiGridListSetItemText(GUIEditor.gridlist[1], a2tostring(getVehicleUpgradeSlotName(getVehicleUpgradeOnSlot(vehi))), falsefalse)
                    guiGridListSetItemText(GUIEditor.gridlist[1], a3"demtuning"falsefalse)
                    if cenaCzesci[getVehicleUpgradeOnSlot(veh,i)] then
                    guiGridListSetItemText(GUIEditor.gridlist[1], a4tostring(tonumber(cenaCzesci[getVehicleUpgradeOnSlot(veh,i)]*9/10)) , falsefalse)
                    else
                    guiGridListSetItemText(GUIEditor.gridlist[1], a4"--" falsefalse)
                    end
                    if nazwaCzesci[getVehicleUpgradeOnSlot(veh,i)] then
                    guiGridListSetItemText(GUIEditor.gridlist[1], a5tostring(nazwaCzesci[getVehicleUpgradeOnSlot(veh,i)]), falsefalse)
                    else
                    guiGridListSetItemText(GUIEditor.gridlist[1], a5"PuddinG" falsefalse)
                    end
                    --    a=a+1
                else
                    for i2,v2 in ipairs(getVehicleCompatibleUpgrades(vehi)) do
                        if cenaCzesci[v2then
                            if not wykluczoneCzesci[v2then
                                if v2 == 1164 then
                                    if getElementModel(veh) == 558 then
                                        local a=guiGridListAddRow(GUIEditor.gridlist[1])
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a1tostring(v2), falsefalse)
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a2tostring(getVehicleUpgradeSlotName(v2)), falsefalse)
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a3"tuning"falsefalse)
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a4tostring(cenaCzesci[v2]), falsefalse)
                                        if nazwaCzesci[v2then
                                            guiGridListSetItemText(GUIEditor.gridlist[1], a5tostring(nazwaCzesci[v2]), falsefalse)
                                        else
                                            guiGridListSetItemText(GUIEditor.gridlist[1], a5"PuddinG" falsefalse)
                                        end
                                    end
                                else
                                    local a=guiGridListAddRow(GUIEditor.gridlist[1])
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a1tostring(v2), falsefalse)
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a2tostring(getVehicleUpgradeSlotName(v2)), falsefalse)
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a3"tuning"falsefalse)
                                    guiGridListSetItemText(GUIEditor.gridlist[1], a4tostring(cenaCzesci[v2]), falsefalse)
                                    if nazwaCzesci[v2then
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a5tostring(nazwaCzesci[v2]), falsefalse)
                                    else
                                        guiGridListSetItemText(GUIEditor.gridlist[1], a5"PuddinG" falsefalse)
                                    end
                                --    a=a+1
                                end
                            end
                        end
                    end
                end
            end
            
            
            GUIEditor.progressbar[1] = guiCreateProgressBar(129*width436*height631*width38*heightfalseGUIEditor.window[1])
            guiProgressBarSetProgress(GUIEditor.progressbar[1], 0)
        end
    else 
        setElementData(localPlayer"tune:car",nil)
    end
    
end)


addEvent("ukryjPanelTuningu",true)
addEventHandler("ukryjPanelTuningu"localPlayer, function()
    if GUIEditor.window[1] and isElement(GUIEditor.window[1]) then
        destroyElement(GUIEditor.window[1])
        setElementData(localPlayer"tune:car",nil)
        showCursor(false)
    end
end)

time=5000

function onClientGUIClick()
    if GUIEditor.button[2] and isElement(GUIEditor.button[2]) and source == GUIEditor.button[2then
        if GUIEditor.window[1] and isElement(GUIEditor.window[1]) then
            destroyElement(GUIEditor.window[1])
            showCursor(false)
        end
    elseif GUIEditor.button[1] and isElement(GUIEditor.button[1]) and source == GUIEditor.button[1then

        if GUIEditor.progressbar[1] and isElement(GUIEditor.progressbar[1]) and GUIEditor.gridlist[1] and isElement(GUIEditor.gridlist[1]) then
            if guiProgressBarGetProgress(GUIEditor.progressbar[1]) == or guiProgressBarGetProgress(GUIEditor.progressbar[1]) == 100 then
            b=0
            local x,guiGridListGetSelectedItem(GUIEditor.gridlist[1])
                if == 1 then 
                    removeEventHandler("onClientGUIClick",resourceRootonClientGUIClick)
                    
                    setTimer(function()
                        b=b+1
                        if GUIEditor.progressbar[1] and isElement(GUIEditor.progressbar[1]) then
                            guiProgressBarSetProgress(GUIEditor.progressbar[1], b)
                        end
                    end,time/100,100)
                    
                    setTimer(function()
                        addEventHandler("onClientGUIClick",resourceRootonClientGUIClick)
                        local text1 guiGridListGetItemText(GUIEditor.gridlist[1], x1) -- ID
                        local text2 guiGridListGetItemText(GUIEditor.gridlist[1], x2) -- TYP
                        local text3 guiGridListGetItemText(GUIEditor.gridlist[1], x3) -- AKCJA
                        local text4 guiGridListGetItemText(GUIEditor.gridlist[1], x4) -- CENA
                        local text5 guiGridListGetItemText(GUIEditor.gridlist[1], x5) -- nazwa
                        if text1 and tonumber(text1) and text4 and tonumber(text4) and text3 and tostring(text3then
--                        if not wykluczoneCzesci[tonumber(text1)] then
                                if cenaCzesci[tonumber(text1)] then
                                    if veh1 and isElement(veh1) and getElementType(veh1) == "vehicle" then
                                        triggerServerEvent("montazElementu"rootveh1text3text1text4text5)
                                    end
                                end
                            end
--                        end
                    end,time*1.14,1)
                end
            end
        end
    end
end

addEventHandler("onClientGUIClick",resourceRootonClientGUIClick)




Za pomoc oczywi?cie :piwo:

[ Dodano: 2017-03-06, 16:26 ]
Dok?adnie
addEvent("pokazPanelTuningu"true)
addEventHandler("pokazPanelTuningu"localPlayer, function(veh)
    if not isElement(GUIEditor.window[1]) then
        if getElementData(veh"vehicle:spawn"then
            showCursor(true)
            veh1 veh
            setElementData(localPlayer"tune:car"veh)
            local screenWscreenH guiGetScreenSize()
            GUIEditor.window[1] = guiCreateWindow((screenW 888) / 2, (screenH 546) / 2888*width546*height"---=== Tuningowanie pojazdu ===---"false)
            guiWindowSetSizable(GUIEditor.window[1], false)
            GUIEditor.button[1] = guiCreateButton(445*width484*height233*width52*height"TUNINGUJ\nDEMONTUJ"falseGUIEditor.window[1])
            guiSetProperty(GUIEditor.button[1], "NormalTextColour""FFAAAAAA")
            GUIEditor.button[2] = guiCreateButton(212*width484*height233*width52*height"ZAMKNIJ OKNO"falseGUIEditor.window[1])
            guiSetProperty(GUIEditor.button[2], "NormalTextColour""FFAAAAAA")
            GUIEditor.gridlist[1] = guiCreateGridList(31*width41*height827*width390*heightfalseGUIEditor.window[1])
            guiGridListAddColumn(GUIEditor.gridlist[1], "ID CZESCI"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "TYP"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "AKCJA"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "KOSZT CZESCI"0.15)
            guiGridListAddColumn(GUIEditor.gridlist[1], "NAZWA Czesci"0.15)
        --    a=0
            for i=0,16 do
                if getVehicleUpgradeOnSlot(vehi) ~= 0 then
                    local a guiGridListAddRow(GUIEditor.gridlist[1])
                    guiGridListSetItemText(GUIEditor.gridlist[1], a1tostring(getVehicleUpgradeOnSlot(vehi)), falsefalse)
                    guiGridListSetItemText(GUIEditor.gridlist[1], a2tostring(getVehicleUpgradeSlotName(getVehicleUpgradeOnSlot(vehi))), falsefalse)
                    guiGridListSetItemText(GUIEditor.gridlist[1], a3"demtuning"falsefalse)
                    if cenaCzesci[getVehicleUpgradeOnSlot(veh,i)] then
                    guiGridListSetItemText(GUIEditor.gridlist[1], a4tostring(tonumber(cenaCzesci[getVehicleUpgradeOnSlot(veh,i)]*9/10)) , falsefalse)
                    else
                    guiGridListSetItemText(GUIEditor.gridlist[1], a4"--" falsefalse)
                    end
                    if nazwaCzesci[getVehicleUpgradeOnSlot(veh,i)] then
                    guiGridListSetItemText(GUIEditor.gridlist[1], a5tostring(nazwaCzesci[getVehicleUpgradeOnSlot(veh,i)]), falsefalse)
                    else
                    guiGridListSetItemText(GUIEditor.gridlist[1], a5"PuddinG" falsefalse)
                    end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-06, 16:29


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

jaki? b??d db3?

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-06, 16:46


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Tu jest problem ,?e nima

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-06, 16:48


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

addEventHandler("onClientGUIClick",root,function()
if source == GUIEditor.button[2then
guiSetVisible(GUIEditor.window[1], false)
showCursor(false)
end
end)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-06, 17:05


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

A gdzie to wklei? bo nie chce zepsu? rok temu robi?em skrypty teraz pozapomina?em par? rzeczy takich wa?nych

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-06, 17:15


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Pomy?l logicznie Skrypterze

Mo?e by? nawet na samym dole.

dodaj sobie
Więcej informacji znajdziesz w Wikipedii MTA:

guiGridListClear
by czysci?o liste.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Tagi: nie :: mogę :: zamknąć :: okna
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Nie mogę zamknąć okna 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