View Full Version : Text Format [ REP ++ ]

16/03/2013, 06:37 PM
Hi.How to make when player registered and now we need to put email but when player don't put text only press enter to show he message EROR:You need to put format @hotmail, @live, @gmail and etc and text... How to make this ?

16/03/2013, 06:43 PM
Are you using dialogs or just a normal command? If you use a normal command, I would suggest you take a look at this: http://forum.sa-mp.com/showthread.php?t=120356

16/03/2013, 06:44 PM

16/03/2013, 06:55 PM
So if I understood right you want it to tell the player that he has to enter something that has the "@hotmail" or any other email service in the string?

If you want to find a certain string format you need to use if(strfind(inputtext,"@gmail",true))

That should return true if the script can find it.

16/03/2013, 06:57 PM
Create input dialog. When he click enter and strlen is equal to 0 you just send him message. Like this:

#define DIALOG_BLA 1
ShowPlayerDialog(playerid,DIALOG_BLA, DIALOG_STYLE_INPUT, "Login", "Bla bla", "Login", "Cancel");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(dialogid == DIALOG_BLA)
if(strlen(inputtext) == 0) return SCM...
//If strlen is more then 0 your code
return 1;
return 0;

16/03/2013, 10:05 PM
thanks :) repped for all