Dialog login
#7

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

pawn Код:
case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    new pname[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, pname, sizeof(pname));
                    new Message[256];
                    format(Message, sizeof(Message), "%s joined!", ReturnName(playerid));
                    SendClientMessageToAll(-1, Message);
                }
                else
                {
                    FailLogin[playerid]++;
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
                    if(FailLogin[playerid] == MAX_FAIL_LOGINS)
                    {
                    Kick(playerid;
                    }
                }
                return 1;
            }
        }
    }
Nvm, I got it worked.
Reply


Messages In This Thread
Dialog login - by DerickClark - 21.03.2014, 01:46
Re: Dialog login - by Unte99 - 21.03.2014, 02:31
Re: Dialog login - by UnknownOwner - 21.03.2014, 02:52
Re: Dialog login - by DerickClark - 21.03.2014, 11:47
Re: Dialog login - by DerickClark - 23.03.2014, 01:26
Re: Dialog login - by Equuuuin0X - 23.03.2014, 01:39
Re: Dialog login - by DerickClark - 23.03.2014, 02:17

Forum Jump:


Users browsing this thread: 1 Guest(s)