#2

pawn Код:
// I hope this works!
    if(dialogid == DIALOGID0+2)
    {
        if(response)
        {
            cmd_login(playerid,inputtext);
            if (PlayerInfo[playerid][LoggedIn] == 1)
            {
                SendClientMessage(playerid, 0x32CD32AA,"* Login Successfull... Welcome Back !");
                return 1;
            }
            if (!udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Account doesn't exist, please use '/register [password]'.");
            if (udb_CheckLogin(PlayerName2(playerid),inputtext))
            {
                new file[256], tmp3[100], lname[MAX_PLAYER_NAME];
                GetPlayerName(playerid,lname,sizeof(lname));
                format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(lname));
                GetPlayerIp(playerid,tmp3,100);
                dini_Set(file,"ip",tmp3);
                LoginPlayer(playerid);
                PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
                if(PlayerInfo[playerid][Level] > 0)
                {
                    format(string,sizeof(string),"|- You have Successfully Logged! | Level %d -|", PlayerInfo[playerid][Level]);
                    SendClientMessage(playerid,green,string);

                }
                else
                {
                    SendClientMessage(playerid,green,"|- You have Successfully logged! -|");
                }
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOGID0+2, DIALOG_STYLE_INPUT,"Password", "WRONG Password, Try Again", "OK", "Cancel");
            }
        }
        else
        {
            SendClientMessage(playerid,green,"You have choosen to not login!");
            Kick(playerid);
        }
        return 1;
    }
Reply


Messages In This Thread
Kick - by Crazyboobs - 23.06.2012, 22:06
Re: Kick - by Dubya - 23.06.2012, 22:10
Re: Kick - by leonardo1434 - 23.06.2012, 22:11
Re: Kick - by Grand_Micha - 23.06.2012, 22:17
Re: Kick - by Crazyboobs - 23.06.2012, 22:18
Re: Kick - by Dubya - 24.06.2012, 02:08

Forum Jump:


Users browsing this thread: 1 Guest(s)