18.02.2016, 12:16
Do you have any ideea why this doesn't work? Considering other dialogs from my register part works just as fine.
The problem is:
Email just doesn't seems to register any data from inputtext, why ... I can't understand.
Dialog id: 6
Here is the code
It just won't work:
Here is the function
And here is how I called it.
This maybe will give you a piece of information about why it doesn't work... I just can't seem, to understand. The country,city etc.. dialog works under the same thing and they work, maybe it is because of the OnPlayerClickTextdraw?
The problem is:
Email just doesn't seems to register any data from inputtext, why ... I can't understand.
Dialog id: 6
Here is the code
Код:
if(dialogid == DIALOG_EMAIL) { if(response) { if(strlen(inputtext) >= 80 || strlen(inputtext) < 1) { SendClientMessage(playerid, COLOR_RED, "ERROR: Email is too long, or too short."); return ShowEmailDialog(playerid); } strmid(InfoAccount[playerid][Email], inputtext, 0, 1000); SendClientMessage(playerid, COLOR_YELLOW, "Thanks, if there is any need, we will contact you through this email."); ShowSecurityDialog(playerid); } else { SelectTextDraw(playerid, COLOR_ORANGE); } }
Here is the function
Код:
stock ShowEmailDialog(playerid) { new str[1024*2]; new string[32]; format(string, sizeof(string), "HELLO "COL_RED"%s"COL_WHITE"\n", GetUserName(playerid)); strcat(str, string); strcat(str, "Please write your email down below."); strcat(str, "It will help contact you if we need to do so.\n"); format(string, sizeof(string), "Your email: %s \n", InfoAccount[playerid][Email]); strcat(str, string); return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "Email", str, "Next", "Cancel"); }
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid) { if(clickedid == CT_6) { CancelSelectTextDraw(playerid); ShowEmailDialog(playerid); } return 1; }