Advertisement
jlalt

report1

Dec 4th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.28 KB | None | 0 0
  1. forward Reports1(playerid);
  2. public Reports1(playerid) {
  3.       new rows, fields;
  4.       cache_get_data(rows, fields, mysql);
  5.       if(rows) {
  6.       new string[128],handle[1000];
  7.       new Name1[MAX_PLAYER_NAME+1],Reason[128],Date[128],count = 1;
  8.       strcat(handle,"Name\tReason\tDate");
  9.       if(cache_get_row_count(mysql) >= 10) {
  10.          for(new i = 0; i < 10; i++ ) {
  11.            cache_get_row(cache_get_row_count()-count, 0, Name1); cache_get_row(cache_get_row_count()-count, 1, Reason); cache_get_row(cache_get_row_count()-count, 2, Date);
  12.            format(string,sizeof string,"\n\%s\t%s\t%s",Name1,Reason,Date); strcat(handle,string);
  13.            count ++;
  14.            return ShowPlayerDialog(playerid, 3654, DIALOG_STYLE_TABLIST_HEADERS, "Reports",handle,"Exit", "");
  15.          }
  16.       }
  17.       for(new i = 1; i <= 9; i++) {
  18.         if(cache_get_row_count() >= i) {
  19.         cache_get_row(i-1, 0, Name1); cache_get_row(i-1, 1, Reason); cache_get_row(i-1, 2, Date);
  20.         format(string,sizeof string,"\n%s\t%s\t%s\t%s",Name1,Reason,Date);
  21.         strcat(handle,string);}
  22.       ShowPlayerDialog(playerid, 3654, DIALOG_STYLE_TABLIST_HEADERS, "Reports",handle,"Exit", "");
  23.       }
  24.       if(!rows) {
  25.       SendClientMessage(playerid,-1,"There Are no Reports at this moment");
  26.    }
  27.       return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement