SA-MP Forums Archive
Help please with making registration for server) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help please with making registration for server) (/showthread.php?tid=342327)



Help please with making admin system for server) - pasha97 - 13.05.2012

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


Re: Help please with making registration for server) - Dan. - 13.05.2012

Try:

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


Re: Help please with making registration for server) - pasha97 - 13.05.2012

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