Wysłany: 2014-11-04, 11:52
wwa22442
Wiek: 38 Na forum: 4706 dni Posty: 127
Piwa : 82
Witajcie.
Od jakiego? czasu bawi? si? w lua i chcia?bym zrobi? rejestracj?. Logowanie dzia?a poprawnie, bo jak wpisze na czacie :
A potem :
to mnie normalnie loguje, przez panel te? mnie zaloguje ale o rejestracji ju? nie ma mowy. Oto kod :
function onLogin ( player , user , pass )
local account = getAccount ( user , pass )
if ( account ~= false ) then
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
outputChatBox ( "Wrong username or password!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
end
addEvent ( "onLogin" , true )
addEventHandler ( "onLogin" , getRootElement (), onLogin )
function onRegister ( player , user , pass )
local account = getAccount ( user , pass )
if ( account ~= false ) then
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
account = addAccount ( user , pass )
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Register/Login error!" , player , 255 , 255 , 0 ) -- 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:
W czym jest problem ?
Pozdrawiam.
Wysłany: 2014-11-04, 11:55
LordKamis
Wiek: 26 Na forum: 4340 dni Posty: 107
Piwa : 190
Wysłany: 2014-11-04, 12:01
wwa22442
Wiek: 38 Na forum: 4706 dni Posty: 127
Piwa : 82
< 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 >
Wysłany: 2014-11-04, 12:46
LordKamis
Wiek: 26 Na forum: 4340 dni Posty: 107
Piwa : 190
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>
Wysłany: 2014-11-04, 14:48
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4395 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
if (logIn ( player, account, pass ) == true) then
Co to wgl za warunek?
Wysłany: 2014-11-04, 15:07
Dixers
No-Life
Wiek: 26 Na forum: 4312 dni Posty: 549
Nick w MP: Dixers
Piwa : 412
To jest tw?j kod? Tak z ciekawo?ci.
Wysłany: 2014-11-04, 15:43
wwa22442
Wiek: 38 Na forum: 4706 dni Posty: 127
Piwa : 82
Nie. To nie jest m?j kod ale chce aby dzia?a?
[ 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
Wysłany: 2014-11-04, 16:48
Tostuch
Wiek: 27 Na forum: 4931 dni Posty: 483
Nick w MP: Tost
Piwa : 137
function onRegister ( player , user , pass )
local account = getAccount ( user , pass )
if ( account ~= false ) then
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
if account = addAccount ( user , pass )
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Register/Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
outputChatBox ( "Nie utworzono konta!" , player , 255 , 255 , 0 )
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
Wysłany: 2014-11-04, 20:25
wwa22442
Wiek: 38 Na forum: 4706 dni Posty: 127
Piwa : 82
"Tostuch" napisał/a : function onRegister ( player , user , pass )
local account = getAccount ( user , pass )
if ( account ~= false ) then
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
if account = addAccount ( user , pass )
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Register/Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
outputChatBox ( "Nie utworzono konta!" , player , 255 , 255 , 0 )
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 ( player , user , pass )
local account = getAccount ( user , pass )
if ( account ~= false ) then
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
if account = addAccount ( user , pass )
if ( logIn ( player , account , pass ) == true ) then
triggerClientEvent ( "hideLoginWindow" , getRootElement ())
else
outputChatBox ( "Register/Login error!" , player , 255 , 255 , 0 ) -- Output they got the details wrong .
end
else
outputChatBox ( "Nie utworzono konta!" , player , 255 , 255 , 0 )
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.
Tagi: rejestracja
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: