07.10.2014, 00:33
Код:
case DIALOG_EMAIL: { if(!response) return Kick(playerid); if(response) { if(strlen(inputtext)) { if(strfind(inputtext,"@",true) != -1) { new emailp = strfind(inputtext, "@", true); if(emailp == -1) { SendClientMessage(playerid, 0xFFFFFFFF, ""COL_RED"[GRESKA]: "COL_WHITE"Unijeli ste "COL_RED"NEPRAVILNU "COL_WHITE"email adresu! Unesite vasu "COL_RED"TOCNU "COL_WHITE"email adresu kako biste "COL_CYAN"ZASTITILI"COL_WHITE" svoj profil."); ShowPlayerDialog(playerid, DIALOG_EMAIL, -1, ""COL_ORANGE"EMAIL", ""COL_WHITE"Unesite ponovno vasu email adresu\n\n\n"COL_ORANGE"Unesite "COL_RED"TOCNU "COL_WHITE" vasu email adresu!", "Dalje", "Odustani"); return 1; } new emailp2 = strfind(inputtext, ".", true); if(emailp2 == -1) { SendClientMessage(playerid, 0xFFFFFFFF, ""COL_RED"[GRESKA]: "COL_WHITE"Unijeli ste "COL_RED"NEPRAVILNU "COL_WHITE"email adresu! Unesite vasu "COL_RED"TOCNU "COL_WHITE"email adresu kako biste "COL_CYAN"ZASTITILI"COL_WHITE" svoj profil."); ShowPlayerDialog(playerid, DIALOG_EMAIL, -1, ""COL_ORANGE"EMAIL", ""COL_WHITE"Unesite ponovno vasu email adresu\n\n\n"COL_ORANGE"Unesite "COL_RED"TOCNU "COL_WHITE"vasu email adresu!", "Dalje", "Odustani"); } new string[128]; new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteString(File, "Email", inputtext); format(string, sizeof(string), "%s", inputtext); format(PlayerInfo[playerid][pEmail],128,"%s",inputtext); INI_Close(File); format(string,sizeof(string),""COL_ORANGE"SERVER "COL_WHITE"Email adresa koju ste unijeli "COL_CYAN"%s"COL_WHITE".",inputtext); SCM(playerid,-1,string); ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT,""COL_ORANGE"GODINE","Koliko imate godina?","Dalje",""); } else { ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, ""COL_ORANGE"EMAIL",""COL_WHITE"Unesite vasu EMAIL adresu koja ce biti postavljena za vas profil.\n"COL_WHITE"Unesite vasu "COL_RED"TOCNU "COL_WHITE"EMAIL adresu radi sigurnosti vaseg profila!!\n\n\n"COL_GREY"Vasu EMAIL adresu necemo prosljedivati niti iskoristavati.","OK",""); } } } }
it giving errors if not type @ and .
Код:
if(strfind(inputtext,"@",true) != -1) { new emailp = strfind(inputtext, "@", true); if(emailp == -1) { SendClientMessage(playerid, 0xFFFFFFFF, ""COL_RED"[GRESKA]: "COL_WHITE"Unijeli ste "COL_RED"NEPRAVILNU "COL_WHITE"email adresu! Unesite vasu "COL_RED"TOCNU "COL_WHITE"email adresu kako biste "COL_CYAN"ZASTITILI"COL_WHITE" svoj profil."); ShowPlayerDialog(playerid, DIALOG_EMAIL, -1, ""COL_ORANGE"EMAIL", ""COL_WHITE"Unesite ponovno vasu email adresu\n\n\n"COL_ORANGE"Unesite "COL_RED"TOCNU "COL_WHITE" vasu email adresu!", "Dalje", "Odustani"); return 1; } new emailp2 = strfind(inputtext, ".", true); if(emailp2 == -1) { SendClientMessage(playerid, 0xFFFFFFFF, ""COL_RED"[GRESKA]: "COL_WHITE"Unijeli ste "COL_RED"NEPRAVILNU "COL_WHITE"email adresu! Unesite vasu "COL_RED"TOCNU "COL_WHITE"email adresu kako biste "COL_CYAN"ZASTITILI"COL_WHITE" svoj profil."); ShowPlayerDialog(playerid, DIALOG_EMAIL, -1, ""COL_ORANGE"EMAIL", ""COL_WHITE"Unesite ponovno vasu email adresu\n\n\n"COL_ORANGE"Unesite "COL_RED"TOCNU "COL_WHITE"vasu email adresu!", "Dalje", "Odustani"); }