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

Wysłany: 2018-04-30, 15:16


Xrent

-






Wiek: 22
Na forum: 3188 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

Ostrzeżeń: 60%
Siemano nie wiem jaki dobra? string bo jak mam logowanie i rejestruje to mog? zarejestrowa? bez has?a, nawet jesli jest 1 spacja, a nie wiem jaki string da? skoro np jak dam
if string.len(loginn) < 2 or string.len(hasloo) < 2 then
to spacj? go omine
tutaj macie fragment kodu i pom??cie mi bo naprawd? nie wiem jaki string dobra?.

addEventHandler("onClientClick", root, function(button, state) -- zaloguj
    if isMouseInPosition(screenW * 0.5894, screenH * 0.3411, screenW * 0.1175, screenH * 0.0611) and state == 'up' then
        local login, pass = guiGetText(loginn), guiGetText(hasloo)
        triggerServerEvent("checkAccount", localPlayer, login, pass)
        if string.len(loginn) < 2 or string.len(hasloo) < 2 then
    end
end)

addEventHandler("onClientClick", root, function(button, state) -- zarejestruj
    if isMouseInPosition(screenW * 0.5887, screenH * 0.5644, screenW * 0.1175, screenH * 0.0611) and state == 'up' then
        local login, pass = guiGetText(loginn), guiGetText(hasloo)
        triggerServerEvent("registerAccount", localPlayer, login, pass)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-30, 15:28


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3351 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

pokombinuj z string.find
np;
if string.len(loginn) < 2 and string.find(loginn," ") or string.len(hasloo) < 2 and string.find(hasloo," ") then 


Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-30, 15:47


Xrent

-






Wiek: 22
Na forum: 3188 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

Ostrzeżeń: 60%
"TeeNekk" napisał/a:

pokombinuj z string.find
np;
if string.len(loginn) < 2 and string.find(loginn," ") or string.len(hasloo) < 2 and string.find(hasloo," ") then 

Pr?bowa?em z tym twoim kodem

if string.len(loginn) < 2 and string.find(loginn," ") or string.len(hasloo) < 2 and string.find(hasloo," ") then
print("Okej")
end
i wywala b?ad https://imgur.com/a/HwC5dAr

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-30, 15:52


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3351 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

   addEventHandler("onClientClick", root, function(button, state) -- zaloguj
    if isMouseInPosition(screenW * 0.5894, screenH * 0.3411, screenW * 0.1175, screenH * 0.0611) and state == 'up' then
        local login, pass = guiGetText(loginn), guiGetText(hasloo)
        if string.len(loginn) < 2 and string.find(loginn," ") or string.len(hasloo) < 2 and string.find(hasloo," ") then print("error") return end
       triggerServerEvent("checkAccount", localPlayer, login, pass)
    end
end)


Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Xrent
Wysłany: 2018-04-30, 16:10


Xrent

-






Wiek: 22
Na forum: 3188 dni
Posty: 230
Nick w MP: Pazdam

Piwa: 535

Respekt: 295,3
Respekt: 295,3Respekt: 295,3Respekt: 295,3

Ostrzeżeń: 60%
"TeeNekk" napisał/a:

   addEventHandler("onClientClick", root, function(button, state) -- zaloguj
    if isMouseInPosition(screenW * 0.5894, screenH * 0.3411, screenW * 0.1175, screenH * 0.0611) and state == 'up' then
        local login, pass = guiGetText(loginn), guiGetText(hasloo)
        if string.len(loginn) < 2 and string.find(loginn," ") or string.len(hasloo) < 2 and string.find(hasloo," ") then print("error") return end
       triggerServerEvent("checkAccount", localPlayer, login, pass)
    end
end)


https://imgur.com/a/hw1Vje3 wywala b??d

[ Dodano: 2018-04-30, 16:15 ]
sam zrobi?em
if string.len(login) < 2 or string.find(login," ") or string.len(pass) < 2 or string.find(pass," ") then print("error") return end


Postaw piwo autorowi tego posta
 

 
Tagi: jaki :: dobrać :: string
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » jaki dobrać string 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