[Tutorial] MySQL Registration System [Threaded Queries(R33+) + Whirlpool]
#32

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 1: //login dialog
        {
            if(!response) Kick(playerid);
            new hpass[129];
            new query[100];
            WP_Hash(hpass, 129, inputtext);
            if(!strcmp(hpass, pInfo[playerid][Password]))
            {
                mysql_format(mysql, query, sizeof(query), "SELECT * FROM `players` WHERE `Username` = '%e' LIMIT 1", Name[playerid]);
                mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
            }
            else
            {
                ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Login", "In order to play, you need to login\nWrong password!", "Login", "Quit");
            }
        }
        case 2: //register dialog
        {
            if(!response) return Kick(playerid);
            if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Register", "In order to play, you need to register.\nYour password must be at least 6 characters long!", "Register", "Quit");
            new query[300];
            WP_Hash(pInfo[playerid][Password], 129, inputtext); //hashing inputtext
            mysql_format(mysql, query, sizeof(query), "INSERT INTO `players` (`Username`, `Password`, `IP`) VALUES ('%e', '%s', '%s')", Name[playerid], pInfo[playerid][Password], IP[playerid]);
           
            mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);
           
        }
    }
    return 1;
}
Reply


Messages In This Thread
MySQL Registration System [Threaded Queries + Whirlpool] - by newbienoob - 05.01.2014, 05:36
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by SyntaxQ - 05.01.2014, 05:46
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Ryan_Bowe - 05.01.2014, 07:19
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Lordzy - 05.01.2014, 07:27
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by iZN - 05.01.2014, 07:30
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by newbienoob - 05.01.2014, 09:51
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by dusk - 05.01.2014, 10:34
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by ]Rafaellos[ - 06.01.2014, 07:08
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by iZN - 06.01.2014, 07:20
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Vince - 06.01.2014, 10:10
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 06.01.2014, 10:34
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by maddinat0r - 06.01.2014, 16:33
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by anou1 - 06.01.2014, 19:19
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 06.01.2014, 19:40
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by anou1 - 06.01.2014, 19:44
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by newbienoob - 07.01.2014, 03:04
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by anou1 - 07.01.2014, 18:26
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by iZN - 07.01.2014, 18:59
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by anou1 - 07.01.2014, 19:05
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by PowerPC603 - 27.01.2014, 13:20
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 27.01.2014, 13:33
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 04.02.2014, 21:00
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Blast3r - 04.02.2014, 21:08
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by PowerPC603 - 04.02.2014, 21:36
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Dorito - 08.02.2014, 07:07
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Zinedine - 08.02.2014, 16:18
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 08.02.2014, 16:23
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Zinedine - 08.02.2014, 16:25
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Zinedine - 09.02.2014, 00:12
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Ryan_Undering - 20.02.2014, 17:21
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 20.02.2014, 17:29
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by jordyvc - 25.03.2014, 16:04
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 25.03.2014, 16:13
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by newbienoob - 25.03.2014, 16:17
Re : MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Cam972 - 25.03.2014, 17:01
Re: Re : MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by newbienoob - 25.03.2014, 17:18
Re : MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Cam972 - 25.03.2014, 18:10
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 25.03.2014, 19:50
Re : MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Cam972 - 28.03.2014, 17:53
Re : MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Cam972 - 30.03.2014, 17:04
Re : MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Maxime_Creteur - 05.04.2014, 07:50
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Thomixio - 24.07.2014, 17:40
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by adithegman - 25.08.2014, 09:04
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by FlipperK119 - 29.08.2014, 22:12
AW: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by klaus1n3 - 21.09.2014, 03:20
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by JeaSon - 21.09.2014, 05:29
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by TakeiT - 21.09.2014, 06:03
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Baltimore - 21.09.2014, 13:52
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by WopsS - 21.09.2014, 13:53
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Baltimore - 21.09.2014, 14:05
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by JeaSon - 22.09.2014, 06:29
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by StegooPs - 25.09.2014, 11:02
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Justinclaveria123 - 10.10.2014, 08:39
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by zwoorelook - 11.10.2014, 17:03
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Vince - 11.10.2014, 18:31
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Ryz - 06.01.2015, 04:55
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Bondage - 13.01.2015, 13:54
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by AgusZ - 16.01.2015, 05:54
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by VenomMancer - 01.02.2015, 12:16
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Nicker - 01.02.2015, 12:41
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by VenomMancer - 02.02.2015, 10:25
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by AchievementMaster360 - 05.03.2015, 02:24
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by AroseKhanNiazi - 09.03.2015, 10:05
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Dorito - 21.03.2015, 09:26
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by BR3TT - 30.03.2015, 13:57
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by BleverCastard - 30.03.2015, 15:01
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by BR3TT - 30.03.2015, 22:56
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by naveen - 20.04.2015, 10:21
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by BleverCastard - 20.04.2015, 15:50
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by naveen - 04.05.2015, 14:18
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by DarkLouis - 07.05.2015, 16:26
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Konstantinos - 07.05.2015, 16:29
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by DarkLouis - 07.05.2015, 16:31
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by DarkLouis - 07.05.2015, 16:38
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by DarkLouis - 07.05.2015, 16:59
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by BigGroter - 16.05.2015, 23:24
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Jihanz - 14.11.2015, 12:55
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by Celirius - 15.04.2016, 22:35
Re: MySQL Registration System [Threaded Queries(R33+) + Whirlpool] - by BennyX - 26.12.2016, 18:31

Forum Jump:


Users browsing this thread: 2 Guest(s)