10.10.2012, 19:21
For more reason i want to make a 'forbidden character' on character '@' for example.
I have this command.
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)
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; }
Someone can help me ? I gave +rep who help me to solve this problem, thanks.
(sorry for my bad english)