Help please with making registration for server)
#1

Hi! here is new problem: login! Login always goes successfully, even if password is wrong, see please what's wrong:

PHP код:
    if(dialogid == DIALID+1)
    {
    if(
response)
    {
        if(
dini_Exists(ustring))
        {
        
GetPlayerName(playeridnamesizeof(name));
          
format(ustringsizeof(ustring), "UltraPadmin/Users/%s.txt"name);
        new 
password[256];
        
password dini_Get(ustring,"PLAYERPASSWORD");
        if(
strcmp(password,inputtext,false,strlen(password)) == 0)
         {
        
SendClientMessage(playerid0xFFFFFFFF"{00ff00}You successfully logged in!");
        }
          else
         {
        
ShowPlayerDialog(playeridDIALID+1DIALOG_STYLE_PASSWORD"Login""This account is registered! Please type your password here or you will be kicked!""Login""Kick me");
        }
        }
        if(!
dini_Exists(ustring))
        {
        
SendClientMessage(playerid0xFFFFFFFF"{ff0000}You are not registered!");
        }
    }
    else
    {
    
Kick(playerid);
    }
    }

Thanks
Reply
#2

Try:

pawn Код:
Dini_Set(ustring, "PLAYERREGISTERDATE", regdate);
You dont have to add:
pawn Код:
"UltraPadmin/Users/%s.txt"
Because thats "ustring".
Reply
#3

Quote:
Originally Posted by Dan.
Посмотреть сообщение
Try:

pawn Код:
Dini_Set(ustring, "PLAYERREGISTERDATE", regdate);
You dont have to add:
pawn Код:
"UltraPadmin/Users/%s.txt"
Because thats "ustring".
Ok, but now happens this: There appear only 3 lines in file:

Код:
PLAYERREGISTERDATE=13/5/2012
PLAYERIP=128.71.158.104
PLAYERMONEY=30000
So PLAYERSCORE and all information after it do not write


Already fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)