Register problem
#1

I got register system but the problem that.. if i put wrong pass it still lets me go in plus even if it says you have to put 6 characters longer it says after i click okay or put 1 character it says "Successfully logged in"

But why logged in? suppose to be successfully registered.. and it doesn't say the same messge about 6 characters.. which code to show ?
Reply
#2

Show your codes, we can't help you without seeing it.
Reply
#3

I suppose you did not create that script on your own, as you don't even know which code would be necessarry to show...
Therefor I suggest contacting the person that created the script for you. He/She should know.
Reply
#4

I did create it. but HOW can i know which code to show ... ._.

Seriously? wow i didn't knew which code to show means i didn't create the script.. pfft
Reply
#5

Quote:
Originally Posted by Stuun23
Посмотреть сообщение
I did create it. but HOW can i know which code to show ... ._.

Seriously? wow i didn't knew which code to show means i didn't create the script.. pfft
Show your OnDialogResponse register/login codes if you are using them with dialogs. also show us your queries, or if you're using commands for register/ login show them.
Reply
#6

So, when you press okey, then it seems to be related with dialogresponse. Maybe you compare the strings false.
Reply
#7

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
          if(
dialogid == dregister)
          {
            if(!
response) return Kick(playerid);
            if(
response)
            {
               if(
strlen(inputtext) < 6) return ShowPlayerDialog(playeriddlogin,DIALOG_STYLE_INPUT"Register""Your password has to be atleast 6 characters long!""Register","bb");
               new 
hashpass[129];
               
WP_Hash(hashpass,sizeof(hashpass),inputtext);
               new 
INI:File INI_Open(Path(playerid));
               
INI_SetTag(File,"Player Information");
               
INI_WriteString(File,"Password",hashpass);
               
INI_WriteInt(File,"AdminLevel",0);
               
INI_WriteInt(File,"VIP",0);
               
INI_WriteInt(File,"Cash",0);
               
INI_WriteInt(File,"Score",0);
               
INI_WriteInt(File,"Kills",0);
               
INI_WriteInt(File,"Deaths",0);
               
INI_Close(File);
               
SendClientMessage(playerid,-1"{00CC00}[System]: {FFFFFF}You have successfully registered!");
               return 
1;
             }
           }
           if(
dialogid == dlogin)
           {
              if(!
response) return Kick(playerid);
              if(
response)
           {
             new 
hashpass[129];
             
WP_Hash(hashpass,sizeof(hashpass),inputtext);
             if(!
strcmp(hashpasspInfo[playerid][Pass], false))
            {
               
INI_ParseFile(Path(playerid),"loaduser_%s",.bExtra true,.extra playerid);
               
SetPlayerScore(playerid,pInfo[playerid][Score]);
               
GivePlayerMoney(playerid,pInfo[playerid][Cash]);
               
pInfo[playerid][Deaths]++;
               
SendClientMessage(playerid,-1"{00CC00}[System]: {FFFFFF}You have successfully logged in!!");
             }
             else
             {
               
ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT"Wrong pass""{FF0000}The password you have entered was incorrect, please try again.","Login","Cya");
             }
             return 
1;
         }
      }
           return 
1;

Reply
#8

return 0 at the end if you use also other filterscript with dialogresponse.
Reply
#9

same.
Reply
#10

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
          if(dialogid == dregister)
          {
            if(!response) return Kick(playerid);
            if(response)
            {
               if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, dregister,DIALOG_STYLE_INPUT, "Register", "Your password has to be atleast 6 characters long!", "Register","bb");
               new hashpass[129];
               WP_Hash(hashpass,sizeof(hashpass),inputtext);
               new INI:File = INI_Open(Path(playerid));
               INI_SetTag(File,"Player Information");
               INI_WriteString(File,"Password",hashpass);
               INI_WriteInt(File,"AdminLevel",0);
               INI_WriteInt(File,"VIP",0);
               INI_WriteInt(File,"Cash",0);
               INI_WriteInt(File,"Score",0);
               INI_WriteInt(File,"Kills",0);
               INI_WriteInt(File,"Deaths",0);
               INI_Close(File);
               SendClientMessage(playerid,-1, "{00CC00}[System]: {FFFFFF}You have successfully registered!");
               return 1;
             }
           }
           if(dialogid == dlogin)
           {
              if(!response) return Kick(playerid);
              if(response)
           {
             new hashpass[129];
             WP_Hash(hashpass,sizeof(hashpass),inputtext);
             if(!strcmp(hashpass, pInfo[playerid][Pass], false))
            {
               INI_ParseFile(Path(playerid),"loaduser_%s",.bExtra = true,.extra = playerid);
               SetPlayerScore(playerid,pInfo[playerid][Score]);
               GivePlayerMoney(playerid,pInfo[playerid][Cash]);
               pInfo[playerid][Deaths]++;
               SendClientMessage(playerid,-1, "{00CC00}[System]: {FFFFFF}You have successfully logged in!!");
             }
             else
             {
               ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT, "Wrong pass", "{FF0000}The password you have entered was incorrect, please try again.","Login","Cya");
             }
             return 1;
         }
      }
           return 1;
}

Try..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)