Registration system...
#1

Hello,

I have a little problem,when I shutting my server down and start it again it tells me to register again but when I don't sutting down the server,but just relog it works perfectly..

Can you help me guys ?
Reply
#2

How does your login/register system looks like
Reply
#3

Quote:
Originally Posted by Frede
Посмотреть сообщение
How does your login/register system looks like
I am using YSI\y_ini.
Reply
#4

Show us some of your loading and saving data code.
Reply
#5

I think this code is the main problem..
pawn Код:
if (PlayerInfo[playerid][pRegisted] == 0)
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Welcome To Base RolePlay !",""COL_WHITE"Please enter your new password in order to register:","Register","Quit");

    }
    if (PlayerInfo[playerid][pRegisted] == 1)
    {
        if(fexist(UserPath(playerid)))
        {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"You are already registered,please write your password below in order to log in! ","Login","Quit");
        }
    }
Reply
#6

How do you check if a player exist

Right now the problem looks easy. When you register your pRegister turn to 1, but your check variable doesnt return 1, so therefore you cant login.
Reply
#7

Look at this line in the code above:
pawn Код:
if(fexist(UserPath(playerid)))
Reply
#8

Quote:
Originally Posted by dorperez
Посмотреть сообщение
Look at this line in the code above:
pawn Код:
if(fexist(UserPath(playerid)))
That is to check if the file exist. Please show more lines related data saving.
Reply
#9

Quote:
Originally Posted by dorperez
Посмотреть сообщение
Look at this line in the code above:
pawn Код:
if(fexist(UserPath(playerid)))
I mean how do you check that pRegister is 1 and not 0
Reply
#10

I fixed it,thank you guys very much
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)