function rejestracja(player, username, password)
local account = getAccount(username, password)
if (account ~= false) then
box("Nie poprawne dane spr?buj jeszcze raz.", player, 255, 255, 255, true )
else
local accountTable = getAccounts ()
if accountTable then
if tostring(accountTable) == tostring(username) then
local DodawanieKonta = addAccount( username, password )
if ( DodawanieKonta ) then
if logIn ( player, account, password ) then
box("Graturacje za?ozy?e? konto na serwer Wojny Gang?w", player, 255, 255, 255, true )
else
outputDebugString ("Rejestraca: b?ad funkcji login Linijka: 34" )
end
else
box("B??d nie stworzy?o konta.", player, 255, 255, 255, true )
end
else
box("Ten Login jest zaj?nty.", player, 255, 255, 255, true )
end
end
end
end
addEvent("WG:Rejectracja", true)
addEventHandler("WG:Rejectracja", getRootElement(), rejestracja)