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

Wysłany: 2021-01-23, 17:58


NekeYT







Wiek: 23
Na forum: 2528 dni
Posty: 58
Nick w MP: Cytrus

Piwa: 6

Respekt: 50

Tak jak w tytule. Jak by kto? m?g? to prosz? o wys?anie naprawionego kodu.

b??dy z debugscripta: https://imgur.com/a/LjlUWAY

kod:
GUIEditor = {
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart"resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateStaticImage(330200405460"elo.png"false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 0.83)

        GUIEditor.button[1] = guiCreateStaticImage(102520065"16.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour""FFAAAAAA")

        GUIEditor.button[2] = guiCreateStaticImage(2002520065"18.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour""FFAAAAAA")

        GUIEditor.button[3] = guiCreateStaticImage(1010020065"20.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour""FFAAAAAA")

        GUIEditor.button[4] = guiCreateStaticImage(20010020065"22.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour""FFAAAAAA")

        GUIEditor.button[5] = guiCreateStaticImage(1017520065"24.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour""FFAAAAAA")

        GUIEditor.button[6] = guiCreateStaticImage(20017520065"26.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour""FFAAAAAA")

        GUIEditor.button[7] = guiCreateStaticImage(1025020065"28.png"falseGUIEditor.window[1])
       guiSetProperty(GUIEditor.button[7], "NormalTextColour""FFAAAAAA")

        GUIEditor.button[9] = guiCreateStaticImage(20025020065"30.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour""FFAAAAAA")


       
        GUIEditor.button[8] = guiCreateStaticImage(10035020065"cofnij.png"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour""FFAAAAAA")    
        
    --    rh guiCreateStaticImage(2337+7011558"button28.png"falseGUIEditor.window[1])guiSetProperty(rh"NormalTextColour""FFAAAAAA")   
    end
)

addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)

marker createMarker(-2009.41168.1027.54'cylinder'425500120)
setElementData(marker"samochod")
--createBlipAttachedTo(marker63)

function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayerthen return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
setElementFrozen(plr,true)
--setElementFrozen(plr,true)
end
addEventHandler("onClientMarkerHit"markerhit)


function p1()
if source ~= GUIEditor.button[1then return end
    triggerServerEvent("p1"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler "onClientGUIClick"rootp1)


function p2()
if source ~= GUIEditor.button[2then return end
    triggerServerEvent("p2"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler "onClientGUIClick"rootp2)

function p3()
if source ~= GUIEditor.button[3then return end
    triggerServerEvent("p3"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler "onClientGUIClick"rootp3)

function p4()
    if source ~= GUIEditor.button[4then return end
        triggerServerEvent("p4"localPlayer)
        guiSetVisible(GUIEditor.window[1],false)
    showCursor(false)
    setElementFrozen(pojazd,false)
    end
    
    addEventHandler "onClientGUIClick"rootp4)

    function p5()
        if source ~= GUIEditor.button[5then return end
            triggerServerEvent("p5"localPlayer)
            guiSetVisible(GUIEditor.window[1],false)
        showCursor(false)
        setElementFrozen(pojazd,false)
        end
        
        addEventHandler "onClientGUIClick"rootp5)

        function p6()
            if source ~= GUIEditor.button[6then return end
                triggerServerEvent("6"localPlayer)
                guiSetVisible(GUIEditor.window[1],false)
            showCursor(false)
            setElementFrozen(pojazd,false)
            end
            
            addEventHandler "onClientGUIClick"root6)

            function p7()
                if source ~= GUIEditor.button[7then return end
                    triggerServerEvent("p7"localPlayer)
                    guiSetVisible(GUIEditor.window[1],false)
                showCursor(false)
                setElementFrozen(pojazd,false)
                end
                
                addEventHandler "onClientGUIClick"rootp7)

                function p8()
                    if source ~= GUIEditor.button[9then return end
                        triggerServerEvent("p8"localPlayer)
                        guiSetVisible(GUIEditor.window[1],false)
                    showCursor(false)
                    setElementFrozen(pojazd,false)
                    end
                    
                    addEventHandler "onClientGUIClick"rootp8)
                    





-------------------------------------------------



function zamknij()
if source ~= GUIEditor.button[8then return end
   guiSetVisible(GUIEditor.window[1], localPlayer)
   setElementFrozen(pojazd,false)
end
addEventHandler "onClientGUIClick"rootzamknij)


function zamykamy()
if source ~= GUIEditor.button[8then return end
guiSetVisible(GUIEditor.window[1],false)
setElementFrozen(pojazd,false)
setElementFrozen(plr,false)
showCursor(false)
end

addEventHandler "onClientGUIClick"rootzamykamy)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-23, 18:27


MacieKK00







Wiek: 31
Na forum: 1958 dni
Posty: 1

Piwa: 1

Respekt: 50

Kod:

GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateStaticImage(330, 200, 405, 460, "elo.png", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)

GUIEditor.button[1] = guiCreateStaticImage(10, 25, 200, 65, "16.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[2] = guiCreateStaticImage(200, 25, 200, 65, "18.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[3] = guiCreateStaticImage(10, 100, 200, 65, "20.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[4] = guiCreateStaticImage(200, 100, 200, 65, "22.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[5] = guiCreateStaticImage(10, 175, 200, 65, "24.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[6] = guiCreateStaticImage(200, 175, 200, 65, "26.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[7] = guiCreateStaticImage(10, 250, 200, 65, "28.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[9] = guiCreateStaticImage(200, 250, 200, 65, "30.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFAAAAAA")



GUIEditor.button[8] = guiCreateStaticImage(100, 350, 200, 65, "cofnij.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA")

-- rh = guiCreateStaticImage(23, 37+70, 115, 58, "button28.png", false, GUIEditor.window[1])guiSetProperty(rh, "NormalTextColour", "FFAAAAAA")
end
)

addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)

marker = createMarker(-2009.41, 168.10, 27.54, 'cylinder', 4, 255, 0, 0, 120)
setElementData(marker, "samochod")
--createBlipAttachedTo(marker, 63)

function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayer) then return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
setElementFrozen(getPedOccupiedVehicle(localPlayer),true)
end
addEventHandler("onClientMarkerHit", marker, hit)


function p1()
if source ~= GUIEditor.button[1] then return end
triggerServerEvent("p1", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p1)


function p2()
if source ~= GUIEditor.button[2] then return end
triggerServerEvent("p2", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p2)

function p3()
if source ~= GUIEditor.button[3] then return end
triggerServerEvent("p3", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p3)

function p4()
if source ~= GUIEditor.button[4] then return end
triggerServerEvent("p4", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p4)

function p5()
if source ~= GUIEditor.button[5] then return end
triggerServerEvent("p5", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p5)

function p6()
if source ~= GUIEditor.button[6] then return end
triggerServerEvent("6", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, 6)

function p7()
if source ~= GUIEditor.button[7] then return end
triggerServerEvent("p7", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p7)

function p8()
if source ~= GUIEditor.button[9] then return end
triggerServerEvent("p8", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p8)






-------------------------------------------------



function zamknij()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1], localPlayer)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, zamknij)


function zamykamy()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1],false)
setElementFrozen(pojazd,false)
setElementFrozen(plr,false)
showCursor(false)
end

addEventHandler ( "onClientGUIClick", root, zamykamy)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
NekeYT
Wysłany: 2021-01-23, 18:56


NekeYT







Wiek: 23
Na forum: 2528 dni
Posty: 58
Nick w MP: Cytrus

Piwa: 6

Respekt: 50

"MacieKK00" napisał/a:

Kod:

GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateStaticImage(330, 200, 405, 460, "elo.png", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)

GUIEditor.button[1] = guiCreateStaticImage(10, 25, 200, 65, "16.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[2] = guiCreateStaticImage(200, 25, 200, 65, "18.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[3] = guiCreateStaticImage(10, 100, 200, 65, "20.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[4] = guiCreateStaticImage(200, 100, 200, 65, "22.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[5] = guiCreateStaticImage(10, 175, 200, 65, "24.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[6] = guiCreateStaticImage(200, 175, 200, 65, "26.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[7] = guiCreateStaticImage(10, 250, 200, 65, "28.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")

GUIEditor.button[9] = guiCreateStaticImage(200, 250, 200, 65, "30.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFAAAAAA")



GUIEditor.button[8] = guiCreateStaticImage(100, 350, 200, 65, "cofnij.png", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA")

-- rh = guiCreateStaticImage(23, 37+70, 115, 58, "button28.png", false, GUIEditor.window[1])guiSetProperty(rh, "NormalTextColour", "FFAAAAAA")
end
)

addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)

marker = createMarker(-2009.41, 168.10, 27.54, 'cylinder', 4, 255, 0, 0, 120)
setElementData(marker, "samochod")
--createBlipAttachedTo(marker, 63)

function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayer) then return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
setElementFrozen(getPedOccupiedVehicle(localPlayer),true)
end
addEventHandler("onClientMarkerHit", marker, hit)


function p1()
if source ~= GUIEditor.button[1] then return end
triggerServerEvent("p1", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p1)


function p2()
if source ~= GUIEditor.button[2] then return end
triggerServerEvent("p2", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p2)

function p3()
if source ~= GUIEditor.button[3] then return end
triggerServerEvent("p3", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p3)

function p4()
if source ~= GUIEditor.button[4] then return end
triggerServerEvent("p4", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p4)

function p5()
if source ~= GUIEditor.button[5] then return end
triggerServerEvent("p5", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p5)

function p6()
if source ~= GUIEditor.button[6] then return end
triggerServerEvent("6", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, 6)

function p7()
if source ~= GUIEditor.button[7] then return end
triggerServerEvent("p7", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p7)

function p8()
if source ~= GUIEditor.button[9] then return end
triggerServerEvent("p8", localPlayer)
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler ( "onClientGUIClick", root, p8)






-------------------------------------------------



function zamknij()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1], localPlayer)
setElementFrozen(pojazd,false)
end
addEventHandler ( "onClientGUIClick", root, zamknij)


function zamykamy()
if source ~= GUIEditor.button[8] then return end
guiSetVisible(GUIEditor.window[1],false)
setElementFrozen(pojazd,false)
setElementFrozen(plr,false)
showCursor(false)
end

addEventHandler ( "onClientGUIClick", root, zamykamy)

Dzi?ki, dzia?a
Na przysz?o?? nie dawaj kodu w "Code" tylko "BBCode" > "TEKST - [lua]"
?ap piwko

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: zamraża :: pojazdu :: podczas :: tuningu :: pojemności
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