22.08.2014, 10:40
So, I created a command "settings", which allows you to edit your name, email, password ...
But, I dunno how to .. do that email... = ...(Field); thing, It gives me an error, if I do email = Field, then it doesn't show anything :d
Code:
But, I dunno how to .. do that email... = ...(Field); thing, It gives me an error, if I do email = Field, then it doesn't show anything :d
Code:
pawn Код:
CMD:settings(playerid, params[]) {
new string[148], Query[120], DBResult:result, Field[70], email[50];
format(Query, sizeof(Query), "SELECT * FROM `USERS` WHERE `NAME` = '%s'", DB_Escape(GetName(playerid)));
result = db_query(HDF, Query);
if(result) db_get_field_assoc(result, "EMAIL", Field, sizeof(Field)); email = strval(Field);
format(string, sizeof(string), "{FFFFFF}Name - {64CC66}%s\n{FFFFFF}e-mail - {64CC66}%s\n{FFFFFF}Password - {64CC66}%s", GetName(playerid), email, PlayerInfo[playerid][Password]);
ShowPlayerDialog(playerid, DIALOG_SETTINGS, DIALOG_STYLE_LIST, "Your settings/info", string, "Edit", "Close");
db_free_result(result);
return 1;
}