17.08.2015, 08:19
this is my registration dialog,how do i make change password dialog?i tried it but still cant.
Код:
if(dialogid == DIALOG_REGISTER) { // If the user clicked the register button if(response) { // Check if the password is within 1 and 100 characters if(!strlen(inputtext) || strlen(inputtext) > 24) { // Re-show the dialog ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register {58D3F7}Password harus lebih dari 0 huruf,maksimal 24 huruf.{FFFFFF}", "{FFFFFF}Username kamu belum ada/belum ter-register! Tolong Register dan masukan password.", "Register", "Cancel"); } else if(strlen(inputtext) > 0 && strlen(inputtext) < 24) { // Password was a valid length new escapedPass[100], query[200], playerName[28], Seconds = gettime(), myIPAddress[16] ; GetPlayerIp(playerid, myIPAddress, sizeof(myIPAddress)); GetPlayerName(playerid, playerName, 24); // Clean the string before inserting to the MySQL database mysql_real_escape_string(inputtext, escapedPass); format(query, sizeof(query), "INSERT INTO playerdata (playerName, playerPass, firstLogged, playerIP) VALUES('%s', SHA1('%s'), '%i', '%s')", playerName, escapedPass, Seconds, myIPAddress); mysql_query(query, MYSQL_RESULT_REGISTER, playerid, connection); } } if(!response) { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register {58D3F7}Password harus lebih dari 0 huruf,maksimal 24 huruf.{FFFFFF}", "{FFFFFF}Username kamu belum ada/belum ter-register! Tolong Register dan masukan password.", "Register", "Cancel"); } }