Help with forbidden characters [+1]
#1

For more reason i want to make a 'forbidden character' on character '@' for example.

I have this command.
Код:
CMD:changeemail(playerid, params[])
{
	new string[128];
	if(sscanf(params, "s[64]", params)) return SendClientMessage(playerid, COLOR_ORANGE, "{F97804}USAGE:{B4B5B7}{FFFFFF} /changeemail [new email]");

	new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));

            new string3[128];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
            new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
			    strmid(PlayerInfo[playerid][pEmail], params, 0, strlen(params), 255);
			    new var[32];
				format(var, 32, "Email=%s\n", PlayerInfo[playerid][pEmail]);fwrite(hFile, var);
			}
			fclose(hFile);

	format(string, sizeof(string), "You have changed your Email Adrees to: {FF6347}%s.", params);
	SendClientMessage(playerid, COLOR_WHITE, string);
	SavePlayerData(playerid);
	return 1;
}
So, i want to make when character '@' is not in text [/changeemail <text>] show you a message just like this "Sorry invalid email adress"

Someone can help me ? I gave +rep who help me to solve this problem, thanks.

(sorry for my bad english)
Reply


Messages In This Thread
Help with forbidden characters [+1] - by CaRa - 10.10.2012, 19:21
Re: Help with forbidden characters [+1] - by PrawkC - 10.10.2012, 19:29
Re: Help with forbidden characters [+1] - by CaRa - 10.10.2012, 19:31
Re: Help with forbidden characters [+1] - by PrawkC - 10.10.2012, 19:35
Re: Help with forbidden characters [+1] - by AndreT - 10.10.2012, 19:36
Re: Help with forbidden characters [+1] - by CaRa - 10.10.2012, 19:47
Re: Help with forbidden characters [+1] - by AndreT - 10.10.2012, 19:56
Re: Help with forbidden characters [+1] - by CaRa - 10.10.2012, 20:12

Forum Jump:


Users browsing this thread: 1 Guest(s)