SA-MP Forums Archive
Dialog checking for @ ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog checking for @ ? (/showthread.php?tid=546623)



Dialog checking for @ ? - Metharon - 16.11.2014

I want to check if the inputtext have @ (is a dialog for inserting e-mail)

I don't know how to do that.. ?

Код:
	if(dialogid == DIALOG_NEWSLETTER2)
	{
        if(!response)
        {
			ShowPlayerDialog(playerid, DIALOG_TICHET, DIALOG_STYLE_MSGBOX, "  ", "{FFFFFF}- Jucator , alege un pachet!\n\n{FFF1AF}[Acest pachet va ofera un bonus de inceput in functie de norocul dvs.]", "Pachet 1", "Pachet 2");
        }
	    if(response)
	    {
    		if( !strlen( inputtext ) ) return 	ShowPlayerDialog(playerid, DIALOG_NEWSLETTER2, DIALOG_STYLE_INPUT, "  ","{FFFFFF}- Jucator , care este adresa de e-mail ?\n\n{FFF1AF}[Va rugam ne furnizati o adresa de e-mail valida deoarece uneori poate fi folosita pentru contact]", "Trimite", "");
			//strmid(Mail[playerid], inputtext, 0, strlen(inputtext));
			//format( PlayerInfo[ playerid ][ Mail ], 4, "%s", Mail[ playerid ] );
			ShowPlayerDialog(playerid, DIALOG_TICHET, DIALOG_STYLE_MSGBOX, "  ", "{FFFFFF}- Jucator , alege un pachet!\n\n{FFF1AF}[Acest pachet va ofera un bonus de inceput in functie de norocul dvs.]", "Pachet 1", "Pachet 2");
			return 1;
		}
	}



Re : Dialog checking for @ ? - Dutheil - 16.11.2014

https://sampwiki.blast.hk/wiki/Useful_Functions#ValidEmail
The link is at the top of the page