30.04.2012, 14:13
pawn Код:
if( dialogid == DIALOG_EMAIL)
{
if(!response) return true;
else
{
new set[100];
format(set,sizeof(set),"SELECT `set` FROM `backup` WHERE `username` = '%s' AND `set` != 0 LIMIT 1",PlayerName(playerid));
mysql_query(set);
mysql_store_result();
if(!mysql_num_rows())
{
//backup
new email[100];
format(email,sizeof(email),"INSERT INTO backup (username,email,IP,set) VALUES ('%s','%s','%s',1)",PlayerName(playerid),inputtext,GetPlayerIP(playerid));
mysql_query(email);
SendClientMessage(playerid,COLOR_MBLUE,"Your email adress have been set");
}
else
{
ShowPlayerDialog(playerid,10000,DIALOG_STYLE_MSGBOX,"\t"RED"ERROR","You have already set your email\nplease contact to admin for more support","OK","");
}
}
}