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

Wysłany: 2014-11-04, 11:52


wwa22442







Wiek: 38
Na forum: 4706 dni
Posty: 127

Piwa: 82

Respekt: 50

Ostrzeżeń: 20%
Witajcie.

Od jakiego? czasu bawi? si? w lua i chcia?bym zrobi? rejestracj?. Logowanie dzia?a poprawnie, bo jak wpisze na czacie :


/register test 12345


A potem :


/login test 12345


to mnie normalnie loguje, przez panel te? mnie zaloguje ale o rejestracji ju? nie ma mowy. Oto kod :


function onLogin playeruserpass )
    local account getAccount userpass )
    if ( account ~= false then
        if (logIn playeraccountpass ) == truethen
            triggerClientEvent "hideLoginWindow"getRootElement())
        else
            outputChatBox "Login error!"player255255) -- Output they got the details wrong.
        end
    else
        outputChatBox "Wrong username or password!"player255255) -- Output they got the details wrong.
    end
end

addEvent"onLogin"true )
addEventHandler"onLogin"getRootElement(), onLogin )

function onRegister playeruserpass )
    local account getAccount userpass )
    if ( account ~= false then
        if (logIn playeraccountpass ) == truethen
            triggerClientEvent "hideLoginWindow"getRootElement())
        else
            outputChatBox "Login error!"player255255) -- Output they got the details wrong.
        end
    else
        account addAccount userpass )
        if (logIn playeraccountpass ) == truethen
            triggerClientEvent "hideLoginWindow"getRootElement())
        else
            outputChatBox "Register/Login error!"player255255) -- Output they got the details wrong.
        end
    end
end

addEvent"onRegister"true )
addEventHandler"onRegister"getRootElement(), onRegister )


A gdy chc? si? zarejestrowa? przez panel to wy?wietla:


Register/Login error!


W czym jest problem ?

Pozdrawiam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 11:55


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Doda?e? linijke do ACL ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 12:01


wwa22442







Wiek: 38
Na forum: 4706 dni
Posty: 127

Piwa: 82

Respekt: 50

Ostrzeżeń: 20%

 <group name="Admin">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="resource.admin"></object>
        <object name="resource.webadmin"></object>
    <object name="resource.mylogin"></object> << to jest ten panel
 </group>


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 12:46


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Spr?buj tak , og??em ten panel jest nie dorobiony :{ np kamerka nie znika jak si? zalogujesz/zarejestrujesz ale ?atwo naprawi? , jak chcesz moge ci podes?a? linka z tym panelem przerobionym co u?ywam na swojim serwerze , doda?em do niego jeszcze spawn na odpowiednie kordy, tylko zmien opis itd bo teraz wyci??em go z serwera
link

Kod:


<group name="Admin">
<acl name="Moderator"></acl>
<acl name="SuperModerator"></acl>
<acl name="Admin"></acl>
<acl name="RPC"></acl>
<object name="resource.admin"></object>
<object name="resource.mylogin"></object>
<object name="resource.webadmin"></object>
</group>


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 14:48


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

if (logIn ( player, account, pass ) == true) then

Co to wgl za warunek?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 15:07


Dixers

No-Life






Wiek: 26
Na forum: 4313 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

To jest tw?j kod? Tak z ciekawo?ci.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 15:43


wwa22442







Wiek: 38
Na forum: 4706 dni
Posty: 127

Piwa: 82

Respekt: 50

Ostrzeżeń: 20%
Nie. To nie jest m?j kod ale chce aby dzia?a? :D

[ Dodano: 2014-11-04, 15:45 ]
"LordKamis" napisał/a:

Spr?buj tak , og??em ten panel jest nie dorobiony :{ np kamerka nie znika jak si? zalogujesz/zarejestrujesz ale ?atwo naprawi? , jak chcesz moge ci podes?a? linka z tym panelem przerobionym co u?ywam na swojim serwerze , doda?em do niego jeszcze spawn na odpowiednie kordy, tylko zmien opis itd bo teraz wyci??em go z serwera
link

Kod:


<group name="Admin">
<acl name="Moderator"></acl>
<acl name="SuperModerator"></acl>
<acl name="Admin"></acl>
<acl name="RPC"></acl>
<object name="resource.admin"></object>
<object name="resource.mylogin"></object>
<object name="resource.webadmin"></object>
</group>


Jak mo?esz da? to ch?tnie skorzystam :) Tylko podczas rejestracji aby mia? kordy w jakim? miejscu a podczas logowania aby nie nadawa?o ?adnych kord?w bo ja mam system zapisu pozycji gdy? grzebie si? pod serwery rpg :P

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 16:48


Tostuch







Wiek: 27
Na forum: 4931 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

function onRegister playeruserpass )
    local account getAccount userpass )
    if ( account ~= false then
        if (logIn playeraccountpass ) == truethen
            triggerClientEvent "hideLoginWindow"getRootElement())
        else
            outputChatBox "Login error!"player255255) -- Output they got the details wrong.
        end
    else
        if account addAccount userpass )
           if (logIn playeraccountpass ) == truethen
               triggerClientEvent "hideLoginWindow"getRootElement())
           else
               outputChatBox "Register/Login error!"player255255) -- Output they got the details  wrong.
           end
        else
        outputChatBox "Nie utworzono konta!"player255255)
        end
    end
end


Je?eli Ci wywali b??d "Nie utworzono konta!" to albo wpisujesz z?e dane albo s? niezgodne z zasadami MTA.
Wi?cej o tych zasadach:
Więcej informacji znajdziesz w Wikipedii MTA:

addAccount


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-04, 20:25


wwa22442







Wiek: 38
Na forum: 4706 dni
Posty: 127

Piwa: 82

Respekt: 50

Ostrzeżeń: 20%
"Tostuch" napisał/a:

function onRegister playeruserpass )
    local account getAccount userpass )
    if ( account ~= false then
        if (logIn playeraccountpass ) == truethen
            triggerClientEvent "hideLoginWindow"getRootElement())
        else
            outputChatBox "Login error!"player255255) -- Output they got the details wrong.
        end
    else
        if account addAccount userpass )
           if (logIn playeraccountpass ) == truethen
               triggerClientEvent "hideLoginWindow"getRootElement())
           else
               outputChatBox "Register/Login error!"player255255) -- Output they got the details  wrong.
           end
        else
        outputChatBox "Nie utworzono konta!"player255255)
        end
    end
end


Je?eli Ci wywali b??d "Nie utworzono konta!" to albo wpisujesz z?e dane albo s? niezgodne z zasadami MTA.
Wi?cej o tych zasadach:
Więcej informacji znajdziesz w Wikipedii MTA:

addAccount


Co? w tym stylu ? :


function onRegister playeruserpass )
    local account getAccount userpass )
    if ( account ~= false then
        if (logIn playeraccountpass ) == truethen
            triggerClientEvent "hideLoginWindow"getRootElement())
        else
            outputChatBox "Login error!"player255255) -- Output they got the details wrong.
        end
    else
        if account addAccount userpass )
           if (logIn playeraccountpass ) == truethen
               triggerClientEvent "hideLoginWindow"getRootElement())
           else
               outputChatBox "Register/Login error!"player255255) -- Output they got the details  wrong.
           end
        else
        outputChatBox "Nie utworzono konta!"player255255)
        end
    end
end

addEvent"onRegister"true )
addEventHandler"onRegister"getRootElement(), onRegister )


Bo je?li tak to teraz zupe?nie ju? nic nie wy?wietla.

[ Dodano: 2014-11-04, 21:34 ]
Wgra?em ju? inny system. Dzieki za odp.

Postaw piwo autorowi tego posta
 

 
Tagi: rejestracja
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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