24.08.2018, 12:49
Hello!
I`m trying to make a system to validate an e-mail.
I did /setmail, when someone will enter an e-mail adress will receive on it a validation key.
After it, he must insert validation key from e-mail but i do not know how to check if the inputtext value is the same with validation key.
I did it:
I use
to check if the value is the same but even if I insert the right value it is doesn't work.
P.S.: In the last dialog when the e-mail is sent PlayerData[playerid][pMailKey] gets that value.
How can I do this?
I`m trying to make a system to validate an e-mail.
I did /setmail, when someone will enter an e-mail adress will receive on it a validation key.
After it, he must insert validation key from e-mail but i do not know how to check if the inputtext value is the same with validation key.
I did it:
Код HTML:
case 589: { if(response && strlen(inputtext)<10) { new da = strlen(inputtext); if(PlayerData[playerid][pMailKey] == da) { new Str[256],pname2[25]; GetPlayerName(playerid,pname2,25); format(string128, sizeof(string128), "You e-mail adress was validated: %s", PlayerData[playerid][pEmail]); SCM(playerid, COLOR_GRAD4, string128); PlayerData[playerid][pMailValid] = 1; format(Str,256,"UPDATE `playeraccounts` SET `MailKey`='0' WHERE `playerID`='%d'",PlayerData[playerid][pInternalID]); mysql_tquery(handle,Str); format(Str,256,"UPDATE `playeraccounts` SET `playerMailValid`='%d' WHERE `playerID`='%d'",PlayerData[playerid][pMailValid],PlayerData[playerid][pInternalID]); mysql_tquery(handle,Str); } return 1; } }
Код HTML:
new da = strlen(inputtext); if(PlayerData[playerid][pMailKey] == da)
P.S.: In the last dialog when the e-mail is sent PlayerData[playerid][pMailKey] gets that value.
How can I do this?