YINI help please
#1

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    new 
string[270], strings[270], playername[25];
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    if(
dialogid == DIALOG_REGISTER)
    {
     if (!
response) return Kick(playerid);
     if(
response)
     {
      if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_GREEN"Register",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
      new 
INI:File INI_Open(AccountsPath(playerid));
      
INI_SetTag(File,"Player Data");
      
INI_WriteInt(File,"Password",num_hash(inputtext));
      
INI_Close(File);
      
format(stringsizeof string,"%s has registered a new account"playername);
      
SendClientMessageToAll(COLOR_YELLOWstring);
      }
    }
    if(
dialogid == DIALOG_LOGIN)
    {
     if (!
response) return Kick (playerid);
     if(
response)
     {
      if(
num_hash(inputtext) == PlayerInfo[playerid][PlayerPass])
      {
       
INI_ParseFile(AccountsPath(playerid), "LoadPlayer_%s", .bExtra true, .extra playerid);
       
SetPlayerScore(playerid,  PlayerInfo[playerid][PlayerScore]);
      }
      else
      {
       
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_RED"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
      }
      return 
1;
      }
     }
    return 
1;

i created this Login/Register system its making the player registered but when i join game again i entered correct pass but its showing wrong password please help
Reply


Messages In This Thread
YINI help please - by BulletRaja - 26.01.2018, 06:22
Re: YINI help please - by jlalt - 26.01.2018, 06:54
Re: YINI help please - by BulletRaja - 26.01.2018, 07:26
Re: YINI help please - by jlalt - 26.01.2018, 08:03
Re: YINI help please - by BulletRaja - 26.01.2018, 08:49
Re: YINI help please - by jlalt - 26.01.2018, 08:53
Re: YINI help please - by BulletRaja - 26.01.2018, 09:09
Re: YINI help please - by BulletRaja - 26.01.2018, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)