Guest User

Untitled

a guest
Jul 13th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.10 KB | None | 0 0
  1. if(dialogid == DIALOG_EMAILS)
  2.     {
  3.         if(response)
  4.         {
  5.             new query[256],read,message[256],result[256],message2[500],timex[64];
  6.             format(query, sizeof(query), "SELECT * FROM `emails` WHERE `ID` = '%d'", EmailId[playerid][listitem]);
  7.             new Cache: emailresult = mysql_query(SQL, query);
  8.             for(new i, j = cache_get_row_count (); i != j; ++i)
  9.             {
  10.                 cache_get_field_content(i, "Message", result); format(message, sizeof(message), result);
  11.                 cache_get_field_content(i, "Time", result); format(timex, sizeof(timex), result);
  12.                 read                    = cache_get_field_content_int(i, "EmailRead");
  13.                 if(read > 0 && PlayerInfo[playerid][pBlockedAcc] == 0)
  14.                 {
  15.                     mysql_format(SQL, query, sizeof(query), "UPDATE `emails` SET `EmailRead`='0'");
  16.                     mysql_tquery(SQL,query,"","");
  17.                 }
  18.             }
  19.             cache_delete(emailresult);
  20.             PlayerInfo[playerid][pNextNotification] = 0;
  21.             format(message2, sizeof(message2), "%s\n\nSent at: %s", message, timex);
  22.             ShowPlayerDialog(playerid,DIALOG_EMAILS2,DIALOG_STYLE_MSGBOX,"Read email",message2,"Back","Exit");
  23.         }
  24.         return 1;
  25.     }
Add Comment
Please, Sign In to add comment