Text Format [ REP ++ ]
#1

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 ?
Reply
#2

Are you using dialogs or just a normal command? If you use a normal command, I would suggest you take a look at this: https://sampforum.blast.hk/showthread.php?tid=120356
Reply
#3

Dialogs
Reply
#4

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.
Reply
#5

Create input dialog. When he click enter and strlen is equal to 0 you just send him message. Like this:

pawn Код:
#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;
}
Reply
#6

thanks repped for all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)