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

Wysłany: 2017-11-25, 11:18


AspWalczak12







Wiek: 46
Na forum: 3113 dni
Posty: 33



Respekt: 50

Mam problem z podpi?ciem przycisk?w pod kod panelu logowania
Oto gui





A to kod oryginalny kod ze starym gui po stronie clienta






Za pomoc dam zime piwko i respekt

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-25, 14:13


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

Do button?w stosujesz event
Więcej informacji znajdziesz w Wikipedii MTA:

onClientGUIClick


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-25, 16:59


AspWalczak12







Wiek: 46
Na forum: 3113 dni
Posty: 33



Respekt: 50

Zamieni?em
 addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(sx*305/2524sy*506/1188sx*200/1024sy*45/768) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) < or string.len(pass) < 2 then
                data.info="Wype?nij wszystkie pola!"
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if isMouseIn(sx*535/764sy*506/1200sx*200/1024sy*45/768) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < or string.len(pass) < 3 then
                data.info="Login/Has?o musz? mie? mniej ni? od 3 do 22 znak?w."
                return
            end
            triggerServerEvent("logging:newAccount"resourceRootloginpass)
        end
    end
end


na

addEventHandler "onClientGUIClick"przycisk1tekst1false)
    if przycisk1=="left" then
        local login=guiGetText(tekst1)
        local pass=guiGetText(tekst2)
            if string.len(login) < or string.len(pass) < 2 then
                data.info="Wypenij wszystkie pola"
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
            local login=guiGetText(tekst1)
            local pass=guiGetText(tekst2)
            if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < or string.len(pass) < 3 then
                data.info="Login/Has?o musz? mie? mniej ni? od 3 do 22 znak?w."
                return
            end
            triggerServerEvent("logging:newAccount"resourceRootloginpass)
        end
    end
end


i nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-26, 12:32


psychol.







Wiek: 23
Na forum: 3502 dni
Posty: 225
Nick w MP: psychol.

Piwa: 2998

Respekt: 244,5
Respekt: 244,5Respekt: 244,5

addEventHandler "onClientGUIClick"przycisk1tekst1false)

zmie? na:
addEventHandler "onClientGUIClick"przycisk1, function()


Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-26, 16:38


AspWalczak12







Wiek: 46
Na forum: 3113 dni
Posty: 33



Respekt: 50

@Asper Nie dzia?a mi to

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-11-26, 20:25


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

AspWalczak12,

1. Usu? "if przycisk1=="left" then" i jednego enda.
2. Nikt za Ciebie ci?gle poprawia? skryptu nie b?dzie.
3. Jakie? db3?

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: moge :: podpiąc :: guzików :: pod :: gui
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 moge podpiąc guzików pod gui 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