Login
#1

How can i make this where if the password is wrong it won't logg you in.

pawn Код:
public OnPlayerLogin(playerid,password[])
{
    if(IsPlayerConnected(playerid)) {
        new DataString[128], Query[128], pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format( Query, sizeof( Query ), "SELECT * FROM `players` WHERE `Username` = '%s'",pname);
        mysql_query(Query);
        mysql_store_result();

        mysql_fetch_field("id", DataString);
        PlayerInfo[playerid][pID] = strval(DataString);
        PlayerInfo[playerid][pID] = PlayerInfo[playerid][pID];


        mysql_fetch_field("Password", DataString);
        PlayerInfo[playerid][pKey] = strval(DataString);
Basically what i'm trying to say is how can i make it detect if the password is right when you enter it in to the dialog and it sends you to this function. Cause as of now when i enter any password it logs me in
Reply


Messages In This Thread
Login - by ihatetn931 - 17.07.2010, 07:20
Re: Login - by [HiC]TheKiller - 17.07.2010, 08:14
Re: Login - by ihatetn931 - 17.07.2010, 08:45
Re: Login - by Grim_ - 17.07.2010, 08:58
Re: Login - by ihatetn931 - 17.07.2010, 09:03
Re: Login - by Grim_ - 17.07.2010, 09:06
Re: Login - by ihatetn931 - 17.07.2010, 09:22
Re: Login - by Grim_ - 17.07.2010, 09:36
Re: Login - by ihatetn931 - 17.07.2010, 09:41
Re: Login - by Grim_ - 17.07.2010, 09:43

Forum Jump:


Users browsing this thread: 1 Guest(s)