udb_hash
#9

Quote:
Originally Posted by iJumbo
Посмотреть сообщение
Mh maybe i fail lol

pawn Код:
if(strcmp(inputtext, PlayerInfo[playerid][pPass],true) == 0)

so you store the player password in PlayerInfo[playerid][pPass] and want check if inputtext is equal to PlayerInfo[playerid][pPass] right?
thank you and sorry for your time but still same problem maybe not ur code problem check my code

PHP код:
public OnPlayerConnect(playerid)
{
    if(
fexist(UserPath(playerid)))
    {
       
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
       
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD""COL_WHITE"Login",""COL_ROZZ"please ENTER your password to login to your game account.","Login","Quit");
       
    }
    else
    {
       
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,""COL_WHITE"Register",""COL_ROZZ"please ENTER your password to register a new game account.","Register","Quit");
    }
    return 
1;

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD""COL_WHITE"Register",""COL_RED"invalid password!.\n"COL_ROZZ"please ENTER your password to register a new game account.","Register","Quit");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteString(File,"Password",inputtext);
                
INI_WriteInt(File,"Cash",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_Close(File);
                
SendClientMessage(playeridCOLOR_ROZZ"Thanks for registering! have a lot of fun on our server.");
            }
        }
        case 
DIALOG_LOGIN:
        {
            if ( !
response ) return Kick playerid );
            if( 
response )
            {
                if(
strcmp(inputtextPlayerInfo[playerid][pPass],true) == 0)
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                    
SendClientMessage(playeridCOLOR_ROZZ"You have logged in!");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"You have entered wrong password.\n"COL_WHITE"Please enter you password to login.","Login","Quit");
                }
                return 
1;
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
udb_hash - by BoU3A - 22.09.2013, 13:18
Re: udb_hash - by DanishHaq - 22.09.2013, 13:24
Re: udb_hash - by JimmyCh - 22.09.2013, 13:25
Re: udb_hash - by iJumbo - 22.09.2013, 13:30
Re: udb_hash - by BoU3A - 22.09.2013, 13:43
Re: udb_hash - by iJumbo - 22.09.2013, 13:48
Re: udb_hash - by BoU3A - 22.09.2013, 13:57
Re: udb_hash - by iJumbo - 22.09.2013, 14:09
Re: udb_hash - by BoU3A - 22.09.2013, 14:29
Re: udb_hash - by iJumbo - 22.09.2013, 14:32

Forum Jump:


Users browsing this thread: 1 Guest(s)