SA-MP Forums Archive
Little Help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little Help! (/showthread.php?tid=394669)



Little Help! - Sanady - 23.11.2012

Hello I create Register System (MYSQL) on my laptop.But he don`t want to create account on PHPmyAdmin.Please help me

pawn Код:
RegisterMember(playerid,password[])
{
    if(strlen(password) < 3 || strlen(password) >= 32)
    {
        SendClientMessage(playerid, -1, ""embed_sw"[ACCOUNT] "embed_white"Your password is too short or too long!");
        format(str,sizeof(str),"{FFFFFF}Welcome to the "embed_lblue"Battlefield 3 "embed_orange"SA-MP"embed_white",this account ("embed_red"%s"embed_white")is "embed_red"not{FFFFFF} registered{FFFFFF}\n"embed_white"Please enter your desired password for this account.\n\n"embed_grey"Once you are registered,do not share your passowrd with anyone besides your self.", pInfo[playerid][Name], playerid);
        ShowPlayerDialog(playerid, 15000, DIALOG_STYLE_INPUT, "Register",str,"Register","Cancel");
    }

    CheckMySQL();
   
    new string[MAX_STRING];
    format(string, sizeof(string), "INSERT INTO Users (Name,Password) VALUES ('%s',MD5('%s'))", pInfo[playerid][Name], password);
    mysql_query(string);
   
    AccountExists[playerid] = 1;
    SendClientMessage(playerid, -1, ""embed_sw"[ACCOUNT] "embed_white"Your account has been created, please login now!");

    LoginMember(playerid,password);
    return 1;
}
This is PHPmyAdmin