Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward Reports1(playerid);
- public Reports1(playerid) {
- new rows, fields;
- cache_get_data(rows, fields, mysql);
- if(rows) {
- new string[128],handle[1000];
- new Name1[MAX_PLAYER_NAME+1],Reason[128],Date[128],count = 1;
- strcat(handle,"Name\tReason\tDate");
- if(cache_get_row_count(mysql) >= 10) {
- for(new i = 0; i < 10; i++ ) {
- 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);
- format(string,sizeof string,"\n\%s\t%s\t%s",Name1,Reason,Date); strcat(handle,string);
- count ++;
- return ShowPlayerDialog(playerid, 3654, DIALOG_STYLE_TABLIST_HEADERS, "Reports",handle,"Exit", "");
- }
- }
- for(new i = 1; i <= 9; i++) {
- if(cache_get_row_count() >= i) {
- cache_get_row(i-1, 0, Name1); cache_get_row(i-1, 1, Reason); cache_get_row(i-1, 2, Date);
- format(string,sizeof string,"\n%s\t%s\t%s\t%s",Name1,Reason,Date);
- strcat(handle,string);}
- ShowPlayerDialog(playerid, 3654, DIALOG_STYLE_TABLIST_HEADERS, "Reports",handle,"Exit", "");
- }
- if(!rows) {
- SendClientMessage(playerid,-1,"There Are no Reports at this moment");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement